Tuesday, March 9, 2010

How to Show a SSRS Report in a Windows Application?

Requesting a Server Report
reportViewer.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Remote;
// Get the Report Server endpoint from the application
// config file
reportViewer.ServerReport.ReportServerUrl = new
Uri(Settings.Default.ReportServerEndPoint);
reportViewer.ServerReport.ReportPath ="/Prologika/Customer Orders";
reportViewer.RefreshReport();
Handling Report Parameters
ReportParameter[] parameters = new ReportParameter[2];
parameters[0] = new ReportParameter("Date", "1/1/2003");
parameters[1] = new ReportParameter("CustomerID",
new string[] { "14335", "15094" });
reportViewer.ServerReport.SetParameters(parameters);

No comments:

Post a Comment