Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

时间:2022-05-24 23:21:26

In this quickstart you will learn how to embed a Power BI Report Server report by using an iFrame in a SharePoint page. If you are working with SharePoint Online, Power BI Report Server must be publicly accessible. In SharePoint Online, the Power BI Web Part that works with the Power BI service doesn’t work with Power BI Report Server.

Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

Prerequisites

Creating the Power BI Report Server report URL

  1. Download the sample from GitHub - Blog Demo.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  2. Open the sample PBIX file from GitHub in Power BI Desktop optimized for Power BI Report Server.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  3. Save the report to the Power BI Report Server.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  4. View report in the Web Portal.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

Capturing the URL parameter

Once you have your URL, you can create an iFrame within a SharePoint page, to host the report. For any Power BI Report Server report URL you can add a querystring parameter of ?rs:embed=true to embed your report into an iFrame.

For example: http://myserver/reports/powerbi/Sales?rs:embed=true

Embedding a Power BI Report Server report in a SharePoint iFrame

  1. Navigate to a SharePoint Site Contents page.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  2. Choose the page where you want to add your report.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  3. Select the gear on the top right and select Edit Page.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  4. Select Add Web Part.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  5. Under Categories select Media and Content, under Parts, select Content Editor, and then select Add.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  6. Select Click here to add new content.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  7. In the ribbon select the Format Text tab then select Edit Source.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  8. In the Edit Source window paste your iFrame code and select OK.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

    For example:

    Copy
    <iframe width="800" height="600" src="http://myserver/reports/powerbi/Sales?rs:embed=true" frameborder="0" allowFullScreen="true"></iframe>
  9. In the ribbon select the Page tab and select Stop Editing.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

  10. Now you should see the report on the page.

    Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server