Forum Discussion
Specify Bookmark for Embedded / Public Report
Hello,
Is there a way of specifying a bookmark to be selected when an Embedded / Public iFrame report is loaded?
I know in an iFrame you can put &navPaneEnabled = 0 for example, I was wondering if there was something similar for a bookmark?
Hi spencerdeane ,
According to the official article description:
In an embedded report, developers can:
- Get a list of saved report bookmarks.
- Apply a saved bookmark by name on report load or during a session.
- Capture and get a current view as a bookmark object.
- Apply a captured bookmark state on report load or during a session
- Perform additional logic when a report bookmark is applied.
- Show or hide the Bookmarks pane.
- Enter or exit bookmarks slide show mode.
And to get the list of saved bookmarks associated with a report, call the getBookmarks method of the BookmarksManager object returned by the report's bookmarksManager property.
The getBookmarks method is defined as follows:
getBookmarks(): Promise<models.IReportBookmark[]>To apply a previously saved bookmark to a report by using its bookmark name, call the apply method of the BookmarksManager object returned by a report's bookmarksManager property.
For more information, see Configure report settings.
The apply method is defined as follows:
Javascript:
apply(bookmarkName: string): Promise<void>For example:
Javascript:
await report.bookmarksManager.apply("Bookmark1234");WIsh it is helpful for you!
Best Regards
Lucien
2 Replies
- ibarrauSuper User
Hi. If you are talking about Publish to Web then no. It will open the report as it was saved. You can change that in URL or parameter.
If you are talking about real deal embed you can. You can check the features for this in the playground: https://playground.powerbi.com/explore-features
I hope that helps,
- v-luwang-msftCommunity Support
Hi spencerdeane ,
According to the official article description:
In an embedded report, developers can:
- Get a list of saved report bookmarks.
- Apply a saved bookmark by name on report load or during a session.
- Capture and get a current view as a bookmark object.
- Apply a captured bookmark state on report load or during a session
- Perform additional logic when a report bookmark is applied.
- Show or hide the Bookmarks pane.
- Enter or exit bookmarks slide show mode.
And to get the list of saved bookmarks associated with a report, call the getBookmarks method of the BookmarksManager object returned by the report's bookmarksManager property.
The getBookmarks method is defined as follows:
getBookmarks(): Promise<models.IReportBookmark[]>To apply a previously saved bookmark to a report by using its bookmark name, call the apply method of the BookmarksManager object returned by a report's bookmarksManager property.
For more information, see Configure report settings.
The apply method is defined as follows:
Javascript:
apply(bookmarkName: string): Promise<void>For example:
Javascript:
await report.bookmarksManager.apply("Bookmark1234");WIsh it is helpful for you!
Best Regards
Lucien