Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
My user want to download a report from Report Server (so not power bi services) to pdf. He can't do this by downloading the pbix and then export to PDF because the report use live connection and my user does'nt have access to datas.
I'd like to do this using a PowerShell script, but I am not allowed by my organisation to download MicrosoftPowerBIMgmt PowerShell module.
I tested several PowerShell scripts found on the net without sucess.
Any idea how to achieve that ?
hank you in advance for your help.
Regards,
Alice
Hi, @Anonymous
You need to know the exact path or ID of the report you want to export. This can usually be found in the report server's web portal.
Power BI Report Server has a REST API that you can use for a variety of tasks, including exporting reports. While the API documentation may not explicitly cover exporting to PDF, it follows a similar structure to the SQL Server Reporting Services (SSRS) REST API, which supports PDF export. You can use the appropriate endpoint to construct a GET request to the report server URL to export the report.
Since you want to use PowerShell for this purpose, you can use cmdlets to make HTTP requests.
Process authentication: Depending on the configuration of the report server, you may need to process authentication. If your server uses Windows authentication, you may need to add parameters to your calls.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thank you very much for your answer.
I am a beginner at PowerShell. I am indeed using REST API, but &rs:Format=PDF parameter doesn't seems to work even with the highest credentials.
Let say the url to download my report as a pbix file is https://ServerName/Reports/api/v2.0/catalogitems(itemid)/Content/$value
What to I have to change to download it as pdf ?
Thank you in advance for your help.
Regards,
Alice