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

本文介绍如何使用 iFrame 在 SharePoint 页面中嵌入 Power BI Report Server 报告。需确保 Power BI Report Server 已安装配置,且在 SharePoint Online 中公开访问。步骤包括:下载 GitHub 示例,使用 Power BI Desktop 优化版打开 PBIX 文件,保存报告到 Power BI Report Server,获取并修改报告 URL 参数,最后在 SharePoint 页面中插入 iFrame。

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.

iFrame sample

Prerequisites

Creating the Power BI Report Server report URL

  1. Download the sample from GitHub - Blog Demo.

    download sample PBIX file

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

    PBI RS Desktop tool

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

    PBI RS Save

  4. View report in the Web Portal.

    Web Portal

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.

    Site Content Page

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

    Site Content Page App

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

    Edit Page option

  4. Select Add Web Part.

    Add Web Part

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

    Select Content Editor Web Part Select Add

  6. Select Click here to add new content.

    Add new content

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

    Edit Source

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

    iFrame code

    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.

    Stop Editing

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

    iFrame sample

转载于:https://www.cnblogs.com/Javi/p/9183316.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值