Power BI Exchange

Expand all | Collapse all

Index page in Reports

  • 1.  Index page in Reports

    Bronze Contributor
    Posted 9 days ago
    Hello everyone,

    I am looking for a way to get the names of the pages of my report into another page of my report.

    Basically, its like creating an index for any report with multiple pages, so that instead of scrolling through the list of pages, when you click on the name of the page on the index page, it takes you to that page.

    The link between the text and the pages can be created via a bookmark, but we need to get the list of the pages into the index page first.

    Also, when the name of the page is changed, it changes the name in the index automatically.

    I am not posting any sample files as this is quite an open question and can be executed with any PBI file.

    If anyone has any ideas or can suggest anything, it will be a great help.

    Thank you,

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------


  • 2.  RE: Index page in Reports

    Bronze Contributor
    Posted 8 days ago
    I'm not sure, if we can do this on Power-BI Desktop or Service.
    But, we can get them on PowerBI Embedded.

    Just plug in this code

    // 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);
    });

    ------------------------------
    Yaswanth (Yash) Muthakapalle
    Greater Chicago Area, IL
    (302) 724-9274
    ------------------------------



  • 3.  RE: Index page in Reports

    Bronze Contributor
    Posted 7 days ago
    Hi @Yaswanth (Yash) Muthakapalle,

    Is this code to be used in the query editor or in the application used to embed PBI content?

    Thank you,​

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------



  • 4.  RE: Index page in Reports

    Bronze Contributor
    Posted 7 days ago
    It's the code you need to plug-in in the application used for your Power-BI Embedded.


    For the reports on service, I am manually creating the bookmarks to the tabs

    ------------------------------
    Yaswanth (Yash) Muthakapalle
    Greater Chicago Area, IL
    (302) 724-9274
    ------------------------------