Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi
I use the ExportTo API to export reports to PDF
This works correctly, but I'd like to also export the filters the user applies to the embedded report.
To do this, I capture the state:
async function CaptureFilters() {
var filter = await report.bookmarksManager.capture();
return filter.state;
}
And I pass it to the API as a property:
"defaultBookmark": {
"state": "xxx"
}
This works correctly if the user sets filters on all pages
If the user sets filters for a single page and then moves to another page and launches the export, the filters for that page aren't captured, but only the ones where they're currently positioned
How can I fix this?
Thanks
Solved! Go to Solution.
Hi @DavideBono97,
In Power BI Embedded, the bookmarksManager.capture() function captures only the current report state for the active page. This means that when exporting, only filters from the page the user is viewing are included. If filters are applied on another page and the user navigates away, those filters will not be captured unless they are part of the report-level state.
To solve this, apply filters at the report level rather than the page level before capturing the bookmark state. You can use the Power BI JavaScript API, such as report.getFilters() and page.getFilters(), to retrieve all active filters, combine them, and then apply them as report-level filters with report.setFilters(). Afterward, call bookmarksManager.capture(). This ensures the captured state, when sent to the ExportTo API via defaultBookmark.state, includes the full filter context across all pages. Alternatively, you can navigate to each page, capture its state, and merge the filters before exporting. This approach ensures the exported PDF includes all user-applied filters from the entire report, not just the active page.
Thank you
Hi @DavideBono97,
In Power BI Embedded, the bookmarksManager.capture() function captures only the current report state for the active page. This means that when exporting, only filters from the page the user is viewing are included. If filters are applied on another page and the user navigates away, those filters will not be captured unless they are part of the report-level state.
To solve this, apply filters at the report level rather than the page level before capturing the bookmark state. You can use the Power BI JavaScript API, such as report.getFilters() and page.getFilters(), to retrieve all active filters, combine them, and then apply them as report-level filters with report.setFilters(). Afterward, call bookmarksManager.capture(). This ensures the captured state, when sent to the ExportTo API via defaultBookmark.state, includes the full filter context across all pages. Alternatively, you can navigate to each page, capture its state, and merge the filters before exporting. This approach ensures the exported PDF includes all user-applied filters from the entire report, not just the active page.
Thank you
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |