Next steps - READ!
•If deploying the control on an intranet site make sure that the page is targeting HTML5.
Adding the Report Viewer Control to a new project
1.Create a new ASP.Net empty web site, or open an existing ASP.Net project
New web project
2.Install the Report Viewer Control Nuget package via the Nuget package manager console
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms
3.Add a new .aspx page to the project and register the Report Viewer Control assembly for use within the page<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
4.Add a ScriptManagerControl to the page
5.Add the Report Viewer control to the page. The below snippet can be updated to reference a report hosted on a remote Report Server
The final page should look like
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Sample" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
Updating an existing project to use the Report Viewer Control
To make use of the Report Viewer Control in an existing project add the control via Nuget, and update assembly references to version 14.0.0.0. This will include updating the project’s web.config and all .aspx pages that reference the Report Viewer Control.
Sample web.config changes
Sample .aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="SampleAspx" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
Common issues
Page is rendering in intranet compatability mode
The Report Viewer Control is designed to be used with modern browsers, the control may not function if browsers render the web page in an IE compatibility mode. Intranet sites may require a '' tag to override setting which encourage rendering intranet pages in compatibility mode.
How to set 100% height on the new Report Viewer control
For detailed instructions click here
Unable to load DLL 'SqlServerSpatial140.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
For detailed instructions, click here.