ReportViewer1.ServerReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationManager.AppSettings["ReportServerURL"].ToString());
ReportViewer1.ServerReport.ReportPath = "/" + System.Configuration.ConfigurationManager.AppSettings["ReportFolderName"].ToString() + "/MReport";
ReportParameter[] myparam = new ReportParameter[2];
myparam[0] = new ReportParameter("UserId", Session["UserID"].ToString().Trim());
myparam[1] = new ReportParameter("RNo", orderedItemsvalue.ToString());
ReportViewer1.ServerReport.SetParameters(myparam);
ReportViewer1.ServerReport.Refresh();
Warning[] warnings
;
string[] streamids;
string mimeType;
string encoding;
string extension;
String deviceInfo = null;
string ReportType = "Excel";
byte[] bytes = ReportViewer1.ServerReport.Render(ReportType, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
File.WriteAllBytes(@"C:\Royalty\Report1.xls", bytes);
Subscribe to:
Post Comments
(
Atom
)
I really liked your blog post.Much thanks again. Awesome.
ReplyDeleteMsbi Developer Course
Best Msbi Online Training