Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I am sorry if there is another question on this I couldn't find.
My aim is to initially embed a dashboard into container.
Then when a tile is clicked I would like to replace the dashboard , in the current page,with the report.
I managed to extract the report id from the clicked tile and create a new config.
Then I reset the current element, the one with the embedded dashboard.
However, when I try to embed again with the new config nothing appears on the screen.
The tileClicked code is:
dashboard.on("tileClicked", function (event) { var clickedTile = event.detail.tileId; if (clickedTile = 'TILE ID') { //window.open('EmbedReport', '_blank'); var url = new URL(event.detail.reportEmbedUrl); var c = url.searchParams.get("reportId"); // Read embed application token from Model var accessToken2 = "@Model.EmbedToken.Token"; // Read embed URL from Model var embedUrl2 = "@Html.Raw(Model.EmbedUrl)"; var models2 = window['powerbi-client'].models; var config2 = { type: 'report', tokenType: models2.TokenType.Embed, accessToken: accessToken2, embedUrl: embedUrl2, id: c, permissions: models2.Permissions.All, settings: { filterPaneEnabled: true, navContentPaneEnabled: true } }; powerbi.reset(dashboardContainer); var reportEmbed = powerbi.embed(dashboardContainer, config2); } });
Thank you in advance!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |