Forum Discussion

Yaostha's avatar
Yaostha
Helper II
8 years ago
Solved

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...
  • v-jiascu-msft's avatar
    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.

    showing_only_specific_page_when_embedding_multipage_report

    // 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