Updated Report Viewer control now generally available
Over the past few months, many of you have tried Release Candidate builds of the updated Report Viewer control in your ASP.NET Web Forms apps and shared valuable feedback with us. Today, we're pleased to announce an updated build that's generally available for you to use in your production apps.
About the Report Viewer control
We’ve heard from many of you using the existing Report Viewer 2015 control in your existing ASP.NET Web Forms apps and awaiting an updated version with, among other things, modern browser support. This update is for you.
A few things to know about this Report Viewer control:
- It's an ASP.NET Web Forms control (there's a Windows Forms version as well) for your existing apps. (Developing new web apps on ASP.NET Core/MVC and other web frameworks? Know that your scenario is on our radar as well.)
- It enables you to embed paginated (RDL) reports into your app. (Looking to embed Power BI reports or mobile reports? We're not building that support into the existing Report Viewer control since it's limited to ASP.NET Web Forms apps, but you can embed any report using an iframe and the rs:Embed=true URL parameter.)
- It supersedes the Report Viewer 2015 version and includes several enhancements we made for SSRS 2016: modern browser support, cross-browser printing, report parameter positioning, and a modern look-and-feel.
- It works with SSRS 2008-2017, and with paginated reports stored in Power BI Report Server.
What’s new in this update
With this update, the Report Viewer control
- Includes Microsoft.SqlServer.Types and SqlServerSpatial140 assemblies, which you may need to render reports that contain maps.
- Won't affect your app's version of jQuery.
- Won't affect your app's jQuery UI CSS.
- Supports the SizeToReportContent setting in IE11 and Firefox.
- Reduces occurrences of redundant scrollbars in IE11.
- Shows correct toolbar buttons on pages whose ResponseEncoding is not UTF-8.
Install the NuGet package
To install the Report Viewer control into your app,
- Open your ASP.NET Web Forms project in Visual Studio 2015 or 2017.
- Open the NuGet Package Manager Console (Tools > NuGet Package Manager > Package Manager Console).
- Enter this command in the console:
That’s it; your project now has the files you need.
Add a Report Viewer control to your page
If your project doesn’t reference an earlier version of the Report Viewer control, you’re ready to add a Report Viewer control to your page. You’ll need to add
Your page will look something like the following:
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %> <%@ Register Assembly=”Microsoft.ReportViewer.WebForms, Version=18.104.22.168, Culture=neutral, PublicKeyToken=89845dcd8080cc91″ Namespace=”Microsoft.Reporting.WebForms” TagPrefix=”rsweb” %><!DOCTYPE html><html xmlns=”http://www.w3.org/1999/xhtml”><head runat=”server”> <title></title> </head><body> <form id=”form1″ runat=”server”> <asp:ScriptManager runat=”server”></asp:ScriptManager> <rsweb:ReportViewer ID=”ReportViewer1″ runat=”server” ProcessingMode=”Remote” Width=”850px” Height=”680px”> <ServerReport ReportServerUrl=”http://your-report-server/reportserver” ReportPath=”/Some Folder/Some Report” /> </rsweb:ReportViewer></form> </body></html>
Just use your
ReportPath in place of the sample values above.
Check out this article for a step-by-step walkthrough.
Update an existing app
If your existing project references a previous version of the Report Viewer control, you’ll need to update a few references in your web pages and web.config file; see this article for more info.