cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jrichview Helper I
Helper I

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 Helper I
Helper I

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
Community Support
Community Support

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 Helper I
Helper I

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.

Highlighted
Community Support
Community Support

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 Helper I
Helper I

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

Community Support
Community Support

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
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.