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,
I successfully displayed an embed report using the load()/render() functions. But when I specify a configuration object in the render() method, I get this error: "Report or group ID do not match loaded configuration".
Here is the code:
var config = { type: 'report', embedUrl: "@Model.EmbedUrl", tokenType: models.TokenType.Embed, accessToken: "@Model.Token", id: "@Model.Id" }; var embedContainer = $('#embedContainer')[0]; var report = powerbi.load(embedContainer, config); report.on("loaded", function () { report.render(config); });
Why do I get this error, I'm pretty sure the id are the same ...
Thanks,
Pellea.
Hi Pellea,
Just see from the code, you didn't even make changes of the config. How can the IDs be different? Can you share the customized config? BTW, I tested it successfully.
>>>Please note, reportId & embedUrl properties MUST remain the same.
Best Regards,
Dale
That's a good question 🙂
BTW, the error message is not helpful (I'm pretty sure the error is elsewhere).
Here is the config I'm using:
config = { type: 'report', embedUrl: "@Model.EmbedUrl", tokenType: models.TokenType.Embed, accessToken: "@Model.Token", id: "@Model.Id", permissions: permissions, settings: { filterPaneEnabled: false, navContentPaneEnabled: false, layoutType: models.LayoutType.Custom, customLayout: { displayOption: models.DisplayOption.FitToPage, } } };
Hi @pellea,
what will happen if you use
// Embed the report and display it within the div container. var report = powerbi.embed(embedContainer, config);
instead of powerbi.load? This is what the live demo for the SDK is using (https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html).
Hope it helps.
Thanos
The embed method displays correctly the report.
But I would like to use the phased API with preload/load/render.
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Phased-Embedding-API
Hi @pellea,
what if you use this: var report = powerbi.load(config); insted of yours powerbi.load(embedcontainer, config)?
And this report.render(config); is not needed if you don't modify the configuration settings. You can call just report.render();
Thanos
The powerbi.load() methods must have the embedContainer or it's not working.
I need update the configuration later. I removed the code for clarity since the problem is not related with that part.
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |