次の方法で共有


Report Viewer control update now available

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 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,

  1. Open the packages.config file in your project and delete the <package> element for the Report Viewer control:
    clip_image001[4]
  2. Remove references to Microsoft.ReportViewer.* assemblies from your project:
    clip_image001[7]

Install the NuGet package

To install the Report Viewer control into your app,

  1. Open your ASP.NET Web Forms project in Visual Studio 2015.
  2. Open the NuGet Package Manager Console (Tools > NuGet Package Manager > Package Manager Console).
  3. Enter this command in the console:
    Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms

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:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="https://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="https://your-report-server/reportserver" ReportPath="/Some Folder/Some Report" />    </rsweb:ReportViewer>

  </form>
</body>

</html>

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.

Known issues

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

Comments

  • Anonymous
    December 01, 2016
    Hi really cool stuff!We are using the Report Viewer Control for our Reporting Portal since 2007. Essential for our case is the impersonation the Control implements, because our customers don't want to have the Reportserver itself exposed in the intranet. We would love to have the Mobile Dashboards in our Portal, but this is not possible now with the control at this point.Are there any plans to change that in the near future?ThxThomas
    • Anonymous
      December 04, 2016
      The existing Report Viewer control was designed for ASP.NET Web Forms and for paginated reports. We've invested in updating the control to support customers' existing ASP.NET Web Forms apps, but we don't plan to extend this particular control to support mobile reports or Power BI reports. You can embed all report types in any web app using the rs:Embed=true URL parameter, and we'd like to support greater control of authentication and richer programmability in future via HTML5/JavaScript APIs.
  • Anonymous
    December 01, 2016
    What are the options for MVC users? I seem to recall something about a new iframe/JavaScript embed option?
  • Anonymous
    December 01, 2016
    Great to see improvements being made! However I just investigated updating and hit a potential issue.The previous preview "Microsoft.ReportViewer.Common.dll" referenced "Microsoft.SqlServer.Types.dll" version 13 which in turn referenced "SqlServerSpatial130.dll". These other DLLs were installed as part of SQL Server 2016 or by installing Microsoft System CLR Types from the SQL Server 2016 Feature Pack.The new "Microsoft.ReportViewer.Common.dll" references "Microsoft.SqlServer.Types.dll" version 14 which is now part of the NuGet package. Which SQL Server version does this come from? It references "SqlServerSpatial140.dll" which doesn't exist on a machine with SQL Server 2016 installed?
    • Anonymous
      December 04, 2016
      Thanks for reporting this issue. It's a known issue if you have a local report (.rdlc) with a map. For now, if you install the SQL Server vNext CTP (https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2016), you can get a copy of SqlServerSpatial140.dll.
      • Anonymous
        December 04, 2016
        Are you going to revert to referencing SQL Server 2016 (v13) DLLs for the next release? We want to use this in Production and shouldn't have to also install vNext/CTP items on our web servers. Our web application also already depends on “Microsoft.SqlServer.Types.dll” v13 in order to interact with geography columns via Entity Framework.
        • Anonymous
          December 05, 2016
          The comment has been removed
          • Anonymous
            December 06, 2016
            If your aim is to deliver an improved report viewer control for SQL Server 2016 I don't understand why you'd make it depend on beta vNext/CTP binaries? Will SQL Server 2016 never have a stable report viewer control?At the moment it renders it unusable for us as our application depends on "Microsoft.SqlServer.Types.dll” and its downstream native binaries to interact with geography columns via Entity Framework. We could reference v14 of this but currently that would require installation of SQL Server vNext/CTP onto Production servers which isn't ideal and I can't find a Feature Pack which might have a standalone CLR Types install for it.I guess if the https://www.nuget.org/packages/Microsoft.SqlServer.Types/ NuGet package was updated to v14 (currently v11) and included native assemblies and a utility to load them it would provide a workable solution although it would still include beta SQL Server assemblies?
            • Anonymous
              December 13, 2016
              Our aim is to deliver a single Report Viewer control that supports multiple versions of SSRS (currently, SSRS 2008 through 2016 and now vNext too), not just SSRS 2016. We're including all the assemblies you need, including Microsoft.SqlServer.Types, in the NuGet package - with SqlServerSpatial the outstanding exception. Again, I agree you shouldn't need to install the full SQL Server product just to get this assembly; merely as a workaround for now, you can install it (on any server, not necessarily your production server) to get a copy. Once we have an updated Feature Pack, you'll have the usual way to get the assembly, and as I said, we're considering adding it to the NuGet package as well.
  • Anonymous
    December 02, 2016
    Thanks Riccardo,Do you have an estimated date of when the control will be out of preview?
    • Anonymous
      December 04, 2016
      We don't yet have a specific date to share, but would like to address a few more known issues and offer official support as soon as we can.
  • Anonymous
    December 08, 2016
    Riccardo,This is great news! Thanks for updating the WebForms ReportViewer. I do have another question though...My company is in the process of moving a large LOB Asp.Net 4.6 Webforms application (with many SSRS reports) to Angular 2 and asp.net 5 (.net core). We are also using JWT (Json Web Tokens) for security to Web API for authentication passing token in header of each http request. Will your future SSRS HTML5 ReportViewer support Angular 2 and JWT? Thanks!
    • Anonymous
      December 14, 2016
      Thanks for your feedback! While I couldn't yet comment for certain on technical details like Angular or JWT, I can say we'd like to have a Report Viewer HTML control compatible with as many web apps as possible and we're cognizant that authentication can be a challenge today.
  • Anonymous
    December 14, 2016
    Hello,Just to confirm (by reading the response from Thomas D.'s question), currently Report Viewer Control 2016 does NOT support rendering Power BI Reports? So you can upload Power BI reports to SSRS 2016 but they are only viewable through the Report Manager Dashboard? We were testing the report viewer 2016 in our MVC app and are using the reports from the "Technical Preview" VM in Azure, and weren't able to open any of the Power BI reports that were in the Report Dashboard. We got an error message saying "The operation you are attempting on item 'Sample Sales Report' is not allowed for this item type. (rsWrongItemType)".If the above is true, is this something you don't see it being supported any time soon? What is our best course of action for integrating both SSRS and Power BI in our MVC application? Using Report Viewer Control 2016 and Power BI Embedded?ThanksJen
    • Anonymous
      February 07, 2017
      Support for the on-prem report hosting through Power BI embedded is something we have planned to support, and we've started discussions with that team around that. We don't have a date yet on when that would be available, but we will keep you updated through this channel on how we're progressing.Thanks,Chris
  • Anonymous
    December 21, 2016
    You mention that we can embed all report types in any web app using the rs:Embed=true; however, if I embed a mobile report within an iframe, how can I proxy the authentication? Using the ReportViewer control, we can proxy the authentication by setting the ReportViewer.ServerReport.ReportServerCredentials property. Is there a method for proxying the authentication for the mobile report?Thanks!
    • Anonymous
      January 23, 2017
      That isn't an option with mobile reports as it is with reports surfaced in the report viewer control currently. We're looking to add support for custom authentication and mobile reports in a future release.Thanks,Chris
    • Anonymous
      January 23, 2017
      Hi Greg,Unfortunately, this isn't supported in mobile reports at this time. We'd like to add custom authentication support for mobile reports in a future release.Thanks,Chris