Edit

Share via


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

In this article, you learn how to embed a Power BI Report Server report by using an iFrame in a SharePoint page. If you're 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 won't work with Power BI Report Server.

Screenshot of iFrame sample.

Prerequisites

Create the Power BI report URL

  1. Download the sample from GitHub: Blog Demo. Select Clone or download, and then select Download ZIP.

    Screenshot showing how to download sample PBIX file.

  2. Unzip the file, and open the sample .pbix file in Power BI Desktop for Power BI Report Server.

    Screenshot of PBI RS Desktop tool.

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

    Screenshot of PBI RS Save.

  4. View report in the Power BI Report Server web portal.

    Screenshot of Web portal.

Capture the URL parameter

After 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, add the following query string parameter to embed your report in a SharePoint iFrame: ?rs:embed=true.

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

Embed the report in a SharePoint iFrame

  1. Navigate to a SharePoint Site Contents page.

    Screenshot of Site Contents page.

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

    Screenshot of Site Contents page app.

  3. Select the gear icon on the top right, and then select Edit page.

    Screenshot of Edit page option.

  4. Select Add a Web Part.

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

    Screenshot showing how to select Content Editor Web Part.

  6. Select Click here to add new content.

  7. From the top menu, select Format Text, and then select Edit Source.

    Screenshot of Edit Source.

  8. In the Edit Source window, paste your iFrame code in HTML Source, and then select OK.

    Screenshot of iFrame code.

    For example:

    <iframe width="800" height="600" src="https://myserver/reports/powerbi/Sales?rs:embed=true" frameborder="0" allowFullScreen="true"></iframe>
    
  9. In the top menu, select Page, and then select Stop Editing.

    Screenshot of Stop Editing.

    The report appears on the page.

    Screenshot of iFrame sample result.

More questions? Try the Power BI Community.