Deploy the Report Viewer web part on a SharePoint site

THIS TOPIC APPLIES TO: yesSQL Server Reporting Services (2016 and later) yesSharePoint yesPower BI Report Server

The Report Viewer Web Part is a custom Web Part that can be used to view SQL Server Reporting Services (native mode) reports within your SharePoint site. You can use the Web Part to view, navigate, print, and export reports on a report server. The Report Viewer Web Part is associated with report definition (.rdl) files that are processed by a SQL Server Reporting Services report server or a Power BI Report Server. This Report Viewer web part cannot be used with Power BI reports hosted in Power BI Report Server.

Use the following instructions to manually deploy the solution package that add the Report Viewer web part to a SharePoint Server 2013 or SharePoint Server 2016 environment. Deploying the solution is a required step for configuring the web part.

The Report Viewer web part is a standalone solution package and is not associated with SharePoint integrated mode for SQL Server Reporting Services.

Requirements

Supported operating systems:

  • Windows Server 2008 R2 SP1 and later

Support SharePoint Server versions:

  • SharePoint Server 2016
  • SharePoint Server 2013

Support Reporting Services versions:

  • SQL Server 2008 Reporting Services (Native mode) and later.
  • Power BI Report Server

Download the Report Viewer web part solution package

The Report Viewer web part is available on the Microsoft Download Center.

Download Report Viewer web part solution package

Deploy the farm solution

This section shows you how to deploy the solution package to your SharePoint farm. This task only needs to be performed once.

  1. On a SharePoint server, open a SharePoint Management Shell using the Run as Administrator option.

  2. Run Add-SPSolution to add the farm solution.

    Add-SPSolution –LiteralPath "{path to file}\ReportViewerWebPart.wsp"
    

    The cmdlet returns the name of the solution, its solution ID, and Deployed=False. In the next step, you will deploy the solution.

  3. Run the Install-SPSolution cmdlet to deploy the farm solution.

    SharePoint 2013

    Install-SPSolution –Identity ReportViewerWebPart.wsp -CompatibilityLevel "14,15" -GACDeployment -WebApplication {URL to web application}
    

    SharePoint 2016

    Install-SPSolution –Identity ReportViewerWebPart.wsp -GACDeployment -WebApplication {URL to web application}
    

Activate feature

  1. In your SharePoint site, select the gear icon in the upper left and select *Site Settings.

    Site settings from the gear icon.

    By default, SharePoint web applications are accessed through port 80. This means that you can often access a SharePoint site by entering http:// to open the root site collection.

  2. In Site Collection Administration, select Site collection features.

  3. Scroll down the page until you find the Report Viewer Web Part Feature.

  4. Select Activate.

    Activate Report Viewer Web Part feature

  5. Repeat for additional site collections by opening each site and clicking Site Actions.

Optionally, you can also use PowerShell to enable this feature on all sites using the Enable-SPFeature cmdlet.

Get-SPWebApplication "<web application url>" | Get-SPSite -Limit ALL | 
        ForEach-Object {
            Write-Host "Enabling feature for $($_.URL)"
            Enable-SPFeature -identity "ReportViewerWebPart" -URL $_.URL -ErrorAction Continue
        }

Remove the solution

Although SharePoint Central Administration provides solution retraction, you do not need to retract the ReportViewerWebPart.wsp file unless you are systematically troubleshooting an installation or patch deployment problem.

  1. In SharePoint Central Administration, in System Settings, select Manage farm solutions.

  2. Select ReportViewerWebPart.wsp.

  3. Select Retract Solution.

Remove the web part from Site settings

Retracting the solution does not remove the Report Viewer web part from the list of web parts within your SharePoint site. To remove the Report Viewer web part, do the following.

  1. In your SharePoint site, select the gear icon in the upper left and select *Site Settings.

    Site settings from the gear icon.

    By default, SharePoint web applications are accessed through port 80. This means that you can often access a SharePoint site by entering http:// to open the root site collection.

  2. Under Web Designer Galleries, select Web parts.

  3. Select the edit icon next to ReportViewerNativeMode.dwp. It may not be listed on the first page of results.

  4. Select Delete Item.

    Edit and delete the Report Viewer Native Mode web part

Deletion of the web part can be attempted by using PowerShell, but there is not a direct command for it. For a script example, see How to delete Web Parts from the Web Part Gallery.

Next steps

After the Report Viewer web part has been deployed and activiated, you can add the web part to a SharePoint page. For more information, see Add Report Viewer web part to a SharePoint page.

More questions? Try asking the Reporting Services forum