Call SSRS Report From ASP.NET
To call SSRS Report from ASP.NET Web application, go through below steps : 1. First of all open Visual Studio 2008 then go to New >> Website 2. Then Browse the directory where you want to save New Web Site. 3. Now In your web page add following controls:
- One ScriptManager
- One Button
- One MicrosoftReportViewer
So your web page design will look like following: 4. Now add following code on button’s click event in your .cs file :
1
2
3
4
5
6
7
8
9
10
11
12
13
| using Microsoft.Reporting.WebForms; try { MyReportViewer.ProcessingMode = ProcessingMode.Remote; MyReportViewer.ServerReport.ReportPath = "/StartSSRS/PersonAddressDetails" ; MyReportViewer.ServerReport.Refresh(); } catch (Exception ex) { Response.Write(ex.ToString()); } |