cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

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.

Highlighted
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
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 368 members 3,822 guests
Please welcome our newest community members: