Forum Discussion

PoovigaS's avatar
PoovigaS
Regular Visitor
10 months ago
Solved

Regarding the ExportFilter functionality

I’m working with Power BI Embedded and trying to export a report (to PDF) while respecting the filters that a user applies in the embedded report. Is there any supported way to capture the user-appli...
  • v-achippa's avatar
    10 months ago

    Hi PoovigaS,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    When exporting an embedded report using getFilters() will not give you the full state the user sees.
    The supported way to export a report exactly as the user sees it is to capture the report’s current state as a bookmark and pass it to the Export API. Please follow below steps:

    • On the client, wait until the report is fully rendered and call
      report.bookmarksManager.capture({ allPages: true, personalizeVisuals: true })
    • Send the captured state(base64 string) to your server.
    • In your ExportToFile API call, pass this value into defaultBookmark.state or per page bookmark.state.

    This way the exported pdf matches what the user sees in the embedded report.

     

    Thanks and regards,

    Anjan Kumar Chippa