cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jrichview Regular Visitor
Regular Visitor

New failure changing pages in a web-hosted report

Our client's web page hosts a power BI report (from service) in an iframe.  There's a dropdown on the page that posts a message to the iframe window to change pages.  This has been working fine until just recently. Now it has absolutely no effect on the displayed page.  Possibly broken in recent update?

1 ACCEPTED SOLUTION

Accepted Solutions
jrichview Regular Visitor
Regular Visitor

Re: New failure changing pages in a web-hosted report

Thank you, but we have the problem addressed now.  This issue can be closed.

 

For anyone still wanting to understand the issue, our original dropdown had a list of the tabs in the report and selecting an item in the dropdown would post a message (to the window inside the iframe to tell it what tab to display.  That is what broke in the update. The following is a snippet from the javascript code:

 

    var message = {
      action: 'setPage',
      pageName: PBIReports.Selector.value
    };

    PBIReports.Frame.contentWindow.postMessage(message, '*');

 

Now the code simply changes the iFrame's src attribute to the base URL with the (poorly documented) querystring parameter &pageName appended to it.

View solution in original post

5 REPLIES 5
Moderator v-qiuyu-msft
Moderator

Re: New failure changing pages in a web-hosted report

Hi @jrichview,

 

Do you use the Embed Code generated from Publish to Web feature to embed the report in an iFrame? 

 

q3.PNG

 

If it is, please copy and paste the URL in Embed Code to a browser page to access the report, check if page name list works. 

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jrichview Regular Visitor
Regular Visitor

Re: New failure changing pages in a web-hosted report

Yes, we use the embed code but we hide the built in pager as the client did not care for it. We created a dropdown to change pages, and that is what does not work.

 

However, since posting this I have discovered a workaround: a query string parameter to append to the url which specifies the page you want to see.

Moderator v-qiuyu-msft
Moderator

Re: New failure changing pages in a web-hosted report

Hi @jrichview,

 

Would you please share code about how you "created a dropdown to change pages"?

 

It would be better if you could share .html file for us to reproduce the issue. If it's possible, you can upload .html file to your OneDrive and send the share link to me via private message. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jrichview Regular Visitor
Regular Visitor

Re: New failure changing pages in a web-hosted report

Thank you, but we have the problem addressed now.  This issue can be closed.

 

For anyone still wanting to understand the issue, our original dropdown had a list of the tabs in the report and selecting an item in the dropdown would post a message (to the window inside the iframe to tell it what tab to display.  That is what broke in the update. The following is a snippet from the javascript code:

 

    var message = {
      action: 'setPage',
      pageName: PBIReports.Selector.value
    };

    PBIReports.Frame.contentWindow.postMessage(message, '*');

 

Now the code simply changes the iFrame's src attribute to the base URL with the (poorly documented) querystring parameter &pageName appended to it.

View solution in original post

Moderator v-qiuyu-msft
Moderator

Re: New failure changing pages in a web-hosted report

Hi @jrichview,

 

Thank your for sharing the solution which will benefit other members who has the same issue. 

 

I will close this thread as you requested. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 2,065 guests
Please welcome our newest community members: