Forum Discussion
Yaostha
8 years agoHelper II
showing only specific page when embedding multipage report
Hi, We have a multipage report published to PowerBI Premium work space (App Workspace). We are using below code to embed the report into web application. But pageName is set to specific p...
- 8 years ago
Hi Yaostha,
The possible cause could be the page name. I guess the page name couldn't be "Page3". Please check it out.
// Get a reference to the embedded report HTML element var embedContainer = $('#embedContainer')[0]; // Get a reference to the embedded report. report = powerbi.get(embedContainer); // Retrieve the page collection and loop through to collect the // page name and display name of each page and display the value. report.getPages() .then(function (pages) { pages.forEach(function(page) { var log = page.name + " - " + page.displayName; Log.logText(log); }); }) .catch(function (error) { Log.log(error); });Best Regards,
Dale
Yaostha
8 years agoHelper II
It is kind of right. I will verify using your code.
What we figured out is, using the diplayname of page is not helping.
We tried copying the page name from PowerBI window when we access in powerbi workspace and it worked.
for my Page3, the equivalent was something like this (ReportSection78a684d020b7c400ea2c).
With help of your script, I will check if i could automatically pick this name in code instead of checking in powerbi and hardcoding.
Thanks for the prompt reply.
Yaostha
8 years agoHelper II
Hi,
After taking the Page Name from PowerBI Service and using that name, it works.
Thanks for your advice.
Regards,
Yasotha