nuthanmurari
nuthanmurari

Reputation: 59

How can I export customized Power BI reports as PDF or PowerPoint on demand after embedded into an application?

Scenario: We consumed Power BI reports into our application. The user is changing report style (Example: Bar to Donut) on-demand and the user wants the selected style to export into PDF or PowerPoint (.ppt).

Is it possible with the Power BI REST API or Power BI SDK? If yes, what are some options or reference materials with code samples?

Upvotes: 0

Views: 1930

Answers (1)

Rohit Ronte
Rohit Ronte

Reputation: 129

To export the customized Power BI Embedded report as PDF or PowerPoint, you need the exportToFile API. The exportToFile API enables exporting a Power BI report by using REST calls, and it supports concurrent export job requests. You have to create an export job first and then follow the below steps:

  1. Sending the export request:
    Send an export request of a specific visual using ExportToFileInGroupAsync
  2. Polling:
    Check if the requested file is ready to export using polling and the export status
  3. Getting the file:
    Polling will return a URL. Use that URL to get the exported file and send it using a file stream.

Please find the reference and code here: Step 1 - sending an export request

Upvotes: 0

Related Questions