The request
A cost manager should be able to pick a campus and a few projects and get a PDF of the monthly financial review for each one, without clicking through every page by hand.
The bug
The export API accepted filter parameters without an error and then rendered the report's default published state. Passing a saved bookmark by name failed the same way. Because the API reported success either way, I started checking the PDFs themselves instead of the response codes.
The fix
- Open the report in a headless browser
- Set the campus and project slicers through the Power BI JavaScript API
- Capture the live bookmark state after the slicers apply
- Pass that captured state to the export job, then poll and download
With that change the filters held on every page for the selected project.
Export-safe visuals
Seven custom HTML visuals would not export at all. I cleaned their text in Power Query, wrote export-safe measures and replaced them with seven native table visuals that carry the same information.
Handoff
The team got a small local web app: pick a campus, select projects, follow a live status log and download the PDFs.
Three issues were still open when my internship ended, and I documented them in the handoff. Data refresh credentials in the test workspace weren't resolved, so some panels rendered blank. Sensitivity labels prevent merging the PDFs into one file. A shared, hosted version needs an app registration and approved infrastructure.
What isn't shown
The report, data and workspace are internal, so none of them are shown here.