Forum Discussion
Anonymous
8 years agoNot applicable
Power BI Embedded - Dashboard click-through
Hi, I'm trying to get a click-through working on a dashboard tile. This is a Power BI Embedded, App-owns-data, scenario, where I'm embedding Power BI visuals (Dashboards and Reports) in a bespoke...
Anonymous
8 years agoNot applicable
An addition: I'm getting this error with what I tried in my JavaScript:
"SCRIPT5022: Embedding on an existing element with a different type than the previous embed object is not supported. Attempted to embed using config {"type":"report","settings": ... } on element <div id="...>, but the existing element contains an embed of type: undefined which does not match the new type: report
Bestand: powerbi.min.js, regel: 2, kolom: 4457
My JS code:
...
var container = powerbi.embed(powerBIContainer, config);
// container.on will add an event handler which prints to Log window. container.on("tileClicked", function (event) { if (event.detail.reportEmbedUrl) { var url = event.detail.reportEmbedUrl; var reportIdRegEx = /reportId="?([^&]+)"?/; var reportIdMatch = url.match(reportIdRegEx); if (reportIdMatch) { config.embedUrl = event.detail.reportEmbedUrl; config.type = 'report'; config.id = reportIdMatch[1]; container = powerbi.embed(powerBIContainer, config); } } });
- micasmith8 years agoNew Member
Also struggling with this issue. Did you manage to find a solution?