在尝试从 .Net MVC 应用程序中的嵌入式 Power BI 报告获取视觉效果时,我尝试了来自嵌入式 Power BI Playground 网站的下面提到的代码。但我无法获得视觉效果。在调试时,我可以看到 Report 的 getPages 属性的值如下:
\ngetPages: \xc6\x92 ()arguments: null caller: null length: 0 name: ""
还有console.log(report.getPages());给予
[[PromiseStatus]]: "pending" [[PromiseValue]]: undefined
PF 我尝试过的代码:
\n// Get a reference to the embedded report HTML element\nvar embedContainer = $(\'#embedContainer\')[0];\n\n// Get a reference to the embedded report.\nreport = powerbi.get(embedContainer);\n\n// Retrieve the page collection and get the visuals for the first page.\nreport.getPages()\n .then(function (pages) {\n // Retrieve active page.\n …Run Code Online (Sandbox Code Playgroud)