Forum Discussion
Export to file - Power BI Report with Filters / Parameters
- Anonymous6 years ago
Hi Anonymous
The documentation currently states that the Bookmark name (whilst accepted as a parameter) is not currently available.
https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofile#pagebookmark
The only way to update output via bookmarks, is to pass in the bookmark state.
And the only way that you can get the bookmark state (that I know of) is via the JavaScript API. https://github.com/Microsoft/PowerBI-JavaScript/wiki/Bookmarks#capture-and-get-a-current-view-as-a-bookmark-object-and-apply-it-back-on-the-current-session
The 'capture' function will return a single string value that represents the bookmark state. You can then pass this into the API.
This is far from ideal... but I think the export API endpoint is still under preview, so will likely change quite a bit.
The idea I raised for adding missing functionality to this API has also moved into the planned phase. So hopefully, it won't be too long before these missing features are available. https://ideas.powerbi.com/ideas/idea/?ideaid=0e056f7d-34b4-4778-974f-929228effcdd
Cheers, Matt
Hi craigbenstock - Any chance you've figured this out?? I'm in the same boat - wanting to apply a filter at runtime when exporting the report as PDF. I haven't been able to find a working example.
Thanks, Greg
Hi orygreg2 and craigbenstock,
If you're still looking, here's a solution.
BI Helper https://bihelper.tech automates the generation of PDF / PPTX reports from Power BI (Pro and Premium), with slicers and filters applied either in batch mode or at runtime. Our implementation bypasses the limitations of the Power BI API endpoints.
In BI Helper, you can select pages to print, schedule and generate multi-page PDF / PPTX reports and email them to your users. Our users routinely run hundreds of reports of up to 30 pages each, with the process fully automated from report generation to email delivery.
Do take a look at https://bihelper.tech and let us know if you need more information.
Kiran Hosakote
BI Helper