Forum Discussion
Can I apply url query parameters to an app-owns-data embedded report?
Effectively, is there any way to dictate the opening page of an embedded report outside of publishing it that way?
Ok, I found the API js element but am unclear on where to insert it...
https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#default-pageHi nckpedersen ,
There are two ways to do so with the Power BI JavaScript API.
You can change the settings in the embed configuration object and set the default page by specifying the page name.
var embedConfig = { ... pageName: 'ReportSection3' };You can also use the setPage method to set the active page of the report.
report.setPage("page2") .catch(error => { ... });You can also add &pageName=YourPageName to the embed URL to set the default page, i.e. https://app.powerbi.com/view?r=XXXXXXXXXXXXXXX&pageName=YourPageName
Refer to:
https://stackoverflow.com/questions/42774398/how-to-set-default-page-in-power-bi-embedded-report
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- nckpedersen
Helper I
Ok, I found the API js element but am unclear on where to insert it...
https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#default-page- V-lianl-msft
Community Support
Hi nckpedersen ,
There are two ways to do so with the Power BI JavaScript API.
You can change the settings in the embed configuration object and set the default page by specifying the page name.
var embedConfig = { ... pageName: 'ReportSection3' };You can also use the setPage method to set the active page of the report.
report.setPage("page2") .catch(error => { ... });You can also add &pageName=YourPageName to the embed URL to set the default page, i.e. https://app.powerbi.com/view?r=XXXXXXXXXXXXXXX&pageName=YourPageName
Refer to:
https://stackoverflow.com/questions/42774398/how-to-set-default-page-in-power-bi-embedded-report
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- nckpedersen
Helper I
Thank you!