久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在 React JS 中嵌入 Power BI 報表以獲取報表實例

Embed a Power BI report in React JS to get report instance(在 React JS 中嵌入 Power BI 報表以獲取報表實例)
本文介紹了在 React JS 中嵌入 Power BI 報表以獲取報表實例的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試在 React JS 中嵌入 Power BI 報表,我想嵌入報表并讓報表實例進一步使用它.我正在使用 Power BI 反應擴展來反應嵌入報告,但我不斷收到無法讀取未定義的屬性嵌入"的錯誤.

I am trying to embed a Power BI report in React JS and I would like to embed the report and get the report instance to work further with it. I am using Power BI react extension in react to embed the report but I keep getting an error that Cannot read property 'embed' of undefined.

索引.js

import { powerbi, models, embed } from "powerbi-client";
import React, { useState, useEffect } from "react";
import ReactDOM from "react-dom";

function ReportBI() {
  let token ="abcExample";
  let embedUrlBi = "https://app.powerbi.com/reportEmbed";
  let reportId = "ReportID";
  
  const embedConfig = {
    type: "report",
    id: reportId,
    embedUrl: embedUrlBi,
    accessToken: token,
    tokenType: models.TokenType.Embed
  };

  function test() {
    var embedContainer = document.getElementById("container");
    var report = powerbi.embed(embedContainer, embedConfig);
    console.log(report);
  }
  useEffect(() => {
    test();
  });
   
  return (
    <>
      <div id="container"></div>
      
    </>
  );
}

const element = <ReportBI />;

ReactDOM.render(element, document.getElementById("root"));

索引.Html

<div id="root">
      <div id="container"></div>
    </div>

我試圖在嵌入報表后獲取它的實例以使用它做其他事情.我可以這樣做嗎?

I am trying to get instance of the report after embedding it to do other things with it. Can I do this?

推薦答案

你可以試試新的 powerbi-client-react 用于在 React 應用程序中嵌入 PowerBI 實體的庫

You may try the new powerbi-client-react library for embedding PowerBI entities in React applications

"getEmbeddedComponent"prop 返回嵌入式 PowerBI 報表的實例

The "getEmbeddedComponent" prop returns the instance of embedded PowerBI report

這篇關于在 React JS 中嵌入 Power BI 報表以獲取報表實例的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 亚欧精品 | 91欧美| 黄视频网站在线 | 亚洲成人精品 | 草久在线 | 成人深夜小视频 | 在线观看欧美日韩视频 | 久久精品国产99国产 | 久色视频在线 | 亚洲欧美日韩电影 | 色吧综合 | 久久精品青青大伊人av | 老司机免费视频 | 色偷偷噜噜噜亚洲男人 | 北条麻妃av一区二区三区 | 国产一区二区视频免费在线观看 | 亚洲三级在线观看 | 午夜免费在线 | 国产精品中文字幕在线 | 97影院2| 日本精品一区二区三区在线观看视频 | 特黄色一级毛片 | 久久国产精品一区二区 | 欧美片网站免费 | 精品国产乱码久久久久久蜜柚 | 麻豆changesxxx国产 | 国产精品久久 | 国产精品久久久久久模特 | 国家一级黄色片 | 久久久成人免费一区二区 | 91av在线免费 | 国产美女在线观看 | 欧美日韩国产精品 | 亚洲伊人精品酒店 | 一区二区电影网 | 亚洲一区二区视频 | 亚洲成人毛片 | 日韩精品成人免费观看视频 | 久久久精品网 | 亚洲aⅴ一区二区 | av影片在线 |