Thanks to Rhys Schmidtke, Senior Software Engineer, for contributing content to today’s post.
A few weeks ago, we published a Release Candidate of an updated Report Viewer 2016 control to NuGet, enabling you to embed paginated reports into your existing ASP.NET Web Forms apps and incorporating several enhancements we made for SSRS 2016, including modern browser support. Since then, many of you have tried the Release Candidate and shared your feedback. Today, we’re pleased to announce an updated Release Candidate for you to try.
What’s new in this update
With this update, the Report Viewer control
- Includes resource files for 14 supported languages
- Supports and renders properly on pages that use ASP.NET master pages
- Supports pages accessed over HTTPS
- Provides improved error messages in some common cases when the control might not be configured properly
First things first…
If you installed the previous Release Candidate into your app, you’ll need to first uninstall it. (You shouldn’t need to perform this step to update future releases, but you do this time.)
To uninstall the previous Release Candidate from your app,
- Open the packages.config file in your project and delete the element for the Report Viewer control:
- Remove references to Microsoft.ReportViewer.* assemblies from your project:
Install the NuGet package
To install the Report Viewer control into your app,
- Open your ASP.NET Web Forms project in Visual Studio 2015.
- Open the NuGet Package Manager Console (Tools > NuGet Package Manager > Package Manager Console).
- Enter this command in the console:
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Pre
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
- A Register tag.
- A ScriptManager control.
- The ReportViewer control itself.
Your page will look something like the following:
Just use your ReportServerUrl and ReportPath in place of the sample values above.
Check out this article for a step-by-step walkthrough.
Update an existing web 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.
You might encounter a couple of known issues with this Release Candidate:
- If you have SQL Server Data Tools (SSDT) 16.5 or earlier installed, you may see an error at design time. (The Report Viewer control should work fine at runtime.) Upgrading to SSDT 17.0 or a future update should resolve this issue.
- If your ASP.NET page (or master page) uses jQuery, it may interfere with the Report Viewer control and some features, such as printing, may not work properly. Commenting out other references to jQuery should avoid this issue.
We aim to address these issues in a future update.
Try it now and send us your feedback
from Business Intelligence Blogs https://blogs.msdn.microsoft.com/sqlrsteamblog/2016/11/30/report-viewer-2016-control-update-now-available/