久久久久久久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 服務器時的歡迎消息)
主站蜘蛛池模板: 男人天堂99 | 国产精品一区在线 | 亚洲天堂成人在线视频 | 亚洲综合精品 | 国产清纯白嫩初高生在线播放视频 | 国产精品成人一区二区三区 | 国产一区二区三区日韩 | 久久国产精品视频 | 在线视频一区二区 | 久久99精品久久久久久秒播九色 | 日本又色又爽又黄又高潮 | 国产精品五区 | 精品亚洲国产成av人片传媒 | 婷婷福利视频导航 | 日本人做爰大片免费观看一老师 | 天天干天天操天天射 | 国产一区二区三区在线看 | 久久精品69 | 日韩精品一区二区在线观看 | 国产大毛片 | 伊人久久综合 | 一级毛片免费视频观看 | av毛片| 国产一区二区三区四区hd | 亚洲精品中文字幕中文字幕 | 91社区在线高清 | 久久综合国产精品 | 五月天国产 | 中文字幕不卡一区 | 久久精彩 | 99精品一区二区 | 免费一级黄色录像 | 九九热在线免费视频 | 欧美黄色一区 | 亚洲第一av网站 | 欧美日韩在线观看一区 | 日韩国产中文字幕 | 国产精品国产精品国产专区不片 | 色又黄又爽网站www久久 | 亚洲另类视频 | 日本又色又爽又黄又高潮 |