Forum Discussion
send report in pdf
- 6 years agoSubscribing to PBIX reports as PDF is currently not supported. It’s in our planned backlog. We will get to it in coming months but no specific timeline to share yet.
Hi Greg_Deckler ,
Could you please let me know on how to Automatically Export Power BI Report in PDF with the help of Power Automate and Power BI REST API.
It would be very helpful for us.
Thanks in Advance
Prakash
- Greg_Deckler6 years agoCommunity Champion
This is the API call to use:
https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofile
You would use Flow (Power Automate) to implement this by calling a PowerShell script, etc. I'm not super up on Flow but you can ask in the Power Automate forums. You would then use the Flow to send the generated file.
- Anonymous6 years agoNot applicable
Hi Greg_Deckler ,
Thanks for your reply.
I tried to Export to PDF with the below code but was getting 1 or more errors.
Invoke-PowerBIRestMethod -Method POST -Url reports/76746e90-02e9-4677-ac7a-0ea5755c6c47/ExportTo -Body PDF -OutFile PDF
Could you or anybody else please help me out in this code? I would like to export it in pdf.
Thanks
Prakash
- Greg_Deckler6 years agoCommunity Champion
I believe the correct code is closer to:
$params = @{"format"="PDF"}
Invoke-PowerBIRestMethod -Method POST -Url reports/a9b01471-0982-4e14-bbf7-ddb60a89ab43/ExportTo -Body $params
However, I am getting some kind of Write error:
Invoke-PowerBIRestMethod : One or more errors occurred.
At line:1 char:1
+ Invoke-PowerBIRestMethod -Method POST -Url reports/a9b01471-0982-4e14 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIR
estMethod], AggregateException
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod