- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-08-2019 11:07 AM
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?
Solved! Go to Solution.
Accepted Solutions
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-10-2019 06:08 AM
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.
All Replies
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-08-2019 07:22 PM
Hi @jrichview,
Do you use the Embed Code generated from Publish to Web feature to embed the report in an iFrame?
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.
Best Regards,
Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-09-2019 05:29 AM
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.
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-10-2019 01:04 AM
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
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-10-2019 06:08 AM
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.
Re: New failure changing pages in a web-hosted report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-11-2019 01:58 AM
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
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.