This article features integration of SQL Server Report With Asp.net Application. To call SQL Server Reports With Asp.net Application from front end can be acheived in few steps as under.
Solution 1 : Direct Load Report in Application.
- Create a new website.
- Add the report viewer to a form.
- Change the ProcessingMode to Remote.
- Also change the AsyncRendering to FALSE.
- Then assign two properites to the report viewer:
- ReportViewer1.ServerReport.ReportServerUrl
- ReportViewer1.ServerReport.ReportPath
Report should then pop up in your page.
Solution 2 : Load the report on click of the menus on a web page.
- Click the smart tag which is located on the top left corner or the ReportViewer to show the ReportViewer Tasks panel.
- In the Choose Report dropdown list, select
to display report on the Report Server. - Type in the Report Server Url in the Report Server Url textbox like Exe:-http://servername/reportserver.
- Keep the Report Path textbox blank.
- In the click event handler of the menu, type in the code below to specify the report dynamically:
- ReportViewer1.ServerReport.ReportPath ="/FolderName/ReportName";
- ReportViewer1.ServerReport.Refresh();
After that, the ReportViewer would not display report until click the menu.