在 SharePoint Online 中嵌入報表網頁組件Embed with report web part in SharePoint Online

你可以使用 SharePoint Online 的 Power BI 新報表網頁組件,輕鬆地在 SharePoint Online 的網頁中內嵌互動式 Power BI 報表。With Power BI's new report web part for SharePoint Online, you can easily embed interactive Power BI reports in SharePoint Online pages.

當使用新的 [內嵌在 SharePoint Online 中] 選項時,內嵌的報表受會到全面性的防護,所以您可以輕鬆地建立安全的內部入口網站。When using the new Embed in SharePoint Online option, the embedded reports are fully secure so you can easily create secure internal portals.

需求Requirements

為了讓內嵌在 SharePoint Online 中的報表運作,必須達成幾項需求。There are a few requirements in order for Embed in SharePoint Online reports to work.

  • SharePoint Online 的 Power BI Web 組件需要新式網頁The Power BI web part for SharePoint Online requires Modern Pages.

內嵌報表Embed your report

若要將報表嵌入 SharePoint Online,您必須先取得報表的 URL,然後在 SharePoint Online 中的新 Power BI 組件使用該 URL。In order to embed your report into SharePoint Online, you will first need to get the URL for the report and then use that URL with the new Power BI web part within SharePoint Online.

取得報表的 URLGet a URL to your report

  1. 在 Power BI 服務中檢視報表。View the report within the Power BI service.

  2. 選取 [檔案] 功能表項目。Select the File menu item.

  3. 選取 [內嵌於 SharePoint Online]。Select Embed in SharePoint Online.

  4. 從對話方塊複製 URL。Copy URL from dialog.

    注意

    您也可以使用檢視報表時,顯示在網頁瀏覽器網址列中的 URL。You can also use the URL that is displayed in your web browser's address bar when viewing a report. URL 會包含目前所檢視的報表頁面。That URL will contain the report page you are currently viewing. 如果您想要使用不同的頁面,您必須從 URL 移除報表區段。You will need to remove the report section, from the URL, if you want to use a different page.

將 Power BI 報表新增至 SharePoint Online 頁面Add the Power BI report to a SharePoint Online page

  1. 在 SharePoint Online 中開啟要使用的頁面,然後選取 [編輯]。Open the desired page in SharePoint Online and select Edit.

    或者藉由選取 SharePoint Online 內的 [+ 新增],以建立新的新式網站頁面。Or, create a new modern site page by selecting + New within SharePoint Online.

  2. 選取 + 然後選取 [Power BI] Web 組件。Select + and select the Power BI web part.

  3. 選取 [新增報告] 。Select Add report.

  4. 將報表 URL 傳送至屬性窗格。Past the report URL into the property pane. 這是您從上述步驟所複製的 URL。This is the URL you copied from the steps above. 報表將會自動載入。The report will load automatically.

  5. 選取 [發佈],讓 SharePoint Online 使用者能看見您所做的變更。Select Publish to make the change visible to your SharePoint Online users.

授與報表存取權Granting access to reports

在 SharePoint Online 中內嵌報表,並不會自動授予使用者檢視報表的權限。Embedding a report in SharePoint Online does not automatically give users permission to view the report. 在 Power BI 服務中,具有檢視報表所需的權限。The permissions to view the report are set within the Power BI service.

重要

請務必檢閱可以看到 Power BI 服務內報表的成員,並將存取權授與未列出的成員。Make sure to review who can see the report within the Power BI service and grant access to those not listed.

有兩個方法可提供 Power BI 服務內報表的存取權。There are two ways to provide access to the report within the Power BI service. 如果您使用 Office 365 群組來建置 SharePoint Online 小組網站,則會將使用者列為 Power BI 服務內的應用程式工作區成員。If you are using an Office 365 Group to build your SharePoint Online team site, you list the user as a member of the app workspace within the Power BI service. 如此可確保使用者能夠檢視該群組的內容。This will make sure that users can view the contents of that group. 如需詳細資訊,請參閱在 Power BI 中建立和散發應用程式For more information, see Create and distribute an app in Power BI.

或者您可以執行下列動作,以將您的報表存取權授與使用者。Alternatively, you can grant users access to your report by doing the following.

  1. 將報表中的磚新增至儀表板。Add a tile from the report to a dashboard.

  2. 與需要存取報表的使用者共用儀表板。Share the dashboard with the users that need access to the report. 如需詳細資訊,請參閱 Share a dashboard with colleagues and others (與同事和其他人共用儀表板)。For more information, see Share a dashboard with colleagues and others.

網頁組件設定Web part settings

以下是 SharePoint Online 的 Power BI 網頁組件之可調整設定的描述。Below is a description of the settings that can be adjusted for the Power BI web part for SharePoint Online.

屬性Property 描述Description
頁面名稱Page name 設定網頁組件所顯示的預設頁面。Sets the default page that is shown by the web part. 從下拉式清單中選取一個值。Select a value from the drop down. 如果沒有顯示任何頁面,可能是您的報表只有一個頁面,或您所貼上的 URL 包含頁面名稱。If no pages are displayed, either your report has one page, or the URL you pasted contains a page name. 從 URL 移除報表區段,以選取特定頁面。Remove the report section from the URL to select a specific page.
顯示Display 調整報表如何被納入 SharePoint Online 頁面的選項。Option to adjust how the report is fit within the SharePoint Online page.
顯示功能窗格Show Navigation Pane 顯示或隱藏頁面功能窗格。Shows or hides the page navigation pane.
顯示篩選窗格Show Filter Pane 顯示或隱藏篩選窗格。Shows or hides the filter pane.

Multi-Factor AuthenticationMulti-factor authentication

如果您的 Power BI 環境需要您使用多重要素驗證進行登入,您可能會被要求使用安全性裝置進行登入,以驗證您的身分識別。If your Power BI environment requires you to sign-in using multi-factor authentication, you may be asked to sign-in with a security device to verify your identity. 如果您沒有使用多重要素驗證登入 SharePoint.Online,但您的 Power BI 環境需要使用安全性裝置來驗證的帳戶時,就會發生此情形。This will occur if you did not sign-in to SharePoint Online using multi-factor authentication but your Power BI environment requires an account validated by a security device.

注意

Azure Active Directory 2.0 尚不支援多重要素驗證。Multi-factor authentication is not yet supported with Azure Active Directory 2.0. 使用者會收到指出「錯誤」的訊息。Users will receive a message saying error. 如果使用者使用他們的安全性裝置再次登入 SharePoint Online ,他們可能可以檢視報表。If the user signs-in again to SharePoint Online using their security device, they may be able to view the report.

不會載入的報表Reports that do not load

您的報表可能未在 Power BI Web 組件中載入,並可能顯示下列訊息。Your report may not load within the Power BI web part and may show the following message.

此內容無法使用。This content isn't available.

有兩個常見的原因會導致此訊息的出現。There are two common reasons for this message.

  1. 您沒有存取此儀表板的權限。You do not have access to the report.
  2. 報表已刪除。The report was deleted.

您應該連絡 SharePoint Online 頁面的擁有者,以協助您解決問題。You should contact the owner of the SharePoint Online page to help you resolve the issue.

已知的問題及限制Known issues and limitations

  • 錯誤:"An error occurred, please try logging out and back in and then revisiting this page.Correlation id: undefined, http response status: 400, server error code 10001, message: Missing refresh token" (發生錯誤。請登出再登入,然後再次前往此頁面。相互關聯識別碼: 未定義。HTTP 回應的狀態: 400。伺服器錯誤碼 10001。訊息: 缺少重新整理權杖)Error: "An error occurred, please try logging out and back in and then revisiting this page. Correlation id: undefined, http response status: 400, server error code 10001, message: Missing refresh token"

    收到此錯誤時,請嘗試執行下列其中一項動作。If you receive this error, please try one of the following.

    1. 登出再登入 SharePoint。Sign-out of SharePoint and sign back in. 請務必關閉所有瀏覽器視窗,然後再重新登入。Be sure to close all browser windows before signing back in.

    2. 若您的使用者帳戶需要多重要素驗證 (MFA),請確定您是使用多重要素驗證裝置 (手機應用程式、智慧卡等等) 登入 SharePoint。If your user account requires multi-factor authentication (MFA), ensure you sign-in to SharePoint using your multi-factor authentication device (phone app, smart card, etc.)

  • Power BI 與 SharePoint Online 支援的當地語系化語言不盡相同。Power BI does not support the same localized languages that SharePoint Online does. 因此,您可能會在內嵌報表中看到未適當當地語系化的內容。As a result, you may not see proper localization within the embedded report.

  • 您若使用 Internet Explorer 10,可能會遇到問題。You may encounter issues if using Internet Explorer 10. 您可以參閱 Power BIOffice 365 的瀏覽器支援。You can look at the browsers support for Power BI and for Office 365.

後續步驟Next steps

允許或防止終端使用者建立新式網站頁面Allow or prevent creation of modern site pages by end users
在 Power BI 中建立和散發應用程式Create and distribute an app in Power BI
Share a dashboard with colleagues and others (與同事和其他人共用儀表板)Share a dashboard with colleagues and others
Power BI Premium - 這是什麼?Power BI Premium - what is it?

有其他問題嗎?More questions? 嘗試在 Power BI 社群提問Try asking the Power BI Community