Forum Discussion
Anonymous
5 years agoNot applicable
Integrate PowerBi and Vue 3
After doing an npm install of "powerbi-client" and importing the module into a vue component import * as pbi from "powerbi-client"; I can not access methods such as pbi.embed() that exist....
- Anonymous5 years ago
Hi Anonymous ,
Please try to add the below codes to declare the reference to the corresponding method of Power BI, you can also refer the content in the following links to get it:
// Grab the reference to the div HTML element that will host the report let reportContainer = <HTMLElement>document.getElementById('reportContainer'); // Embed the report and display it within the div container let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory); let report = powerbi.embed(reportContainer, config);Power BI embed + VueJS error: “TypeError: Cannot read property 'powerBiEmbed' of null”
How To Embed Power BI Report In Angular 6
Best Regards
Anonymous
5 years agoNot applicable
Hi Anonymous ,
Please try to add the below codes to declare the reference to the corresponding method of Power BI, you can also refer the content in the following links to get it:
// Grab the reference to the div HTML element that will host the report
let reportContainer = <HTMLElement>document.getElementById('reportContainer');
// Embed the report and display it within the div container
let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
let report = powerbi.embed(reportContainer, config);
Power BI embed + VueJS error: “TypeError: Cannot read property 'powerBiEmbed' of null”
How To Embed Power BI Report In Angular 6
Best Regards