Prepare report(s)/chart(s)
Report1:
Report2:
Integrate reports - way1: use iframe
find the report file at http://localhost/reportserver
open a report and get the url like
http://hostname/ReportServer/Pages/ReportViewer.aspx?%2fReports%2fEbay%2forder+summary&rs:Command=Render
it will display a non-bordered report
Create a html page, add an iframe with this url
Open this page, the browser will load the report report
Integrate reports - way2: use ReportViewer
Create webform project
Microsoft provides ReportView control only for webform project, therefore, we have to create a web form project
-
Install nuget lib
ReportViewerControl
-
add a webform page
configuration
- edit web.config
... <compilation debug="true" targetFramework="4.6.1"> <buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> </buildProviders> <assemblies> <add assembly="Microsoft.ReportViewer.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> <add assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> </assemblies> </compilation> <httpHandlers> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false" /> </httpHandlers> </system.web> <system.webServer> ... <validation validateIntegratedModeConfiguration="false" /> <handlers> <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </handlers> </system.webServer>
make sure remove previous reportviewer assemblies i.e. v12.x
Add ReportViewer control
-
drop and drop ReportViewer control from toolbox, put it into
<form>...</form>
-
add a ScriptManager control within
<form>...</form>
-
Compile the project and open the web page
Reference
Integrating Reporting Services Using ReportViewer Controls - Get Started
Get more done in the new Reporting Services web portal with SQL Server 2016 RC0
Report Viewer control update now available
-
Previous
SQL Server Reporting Services Tutorial 4 - Create charts -
Next
ASP.NET SOAP ASMX Web Services Tutorial