Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chillguin
New Member

Power BI API - Export PDF based on parameters.

Hello. 
I am currently in the research process of developing a system for my client to ship reports to customers.
I've close to no knowledge about Power BI. Which leads me to my explanation and question(s) 😄

 

I am considering doing the following:

Creating reports in Power BI for the client's benefit so management can use these in the web app i've developed. Using the embedded functionality that powerbi provides - which i've pretty much understood is solid and works fine.

But my client is also going to do a per customer PDF export of this report. So my thought was to utilize the Power BI API:


I read the documentation for the PowerBI API and i've understand that you can do Export to file(pdf), then poll to see if it is ready for download and finally get the filestream. However, i fail to see any way to make this kind of request using any sort of parameter other than the "reportId" which i assume is the actual id of the report. However I've found the PaginatedReportExportConfiguration in the docs which can contain a set of "ParameterValue". Is this the way to solve this? I like looking at examples and i have not found any so any example sourcecode would be more than welcome 😄

Am i correct in assuming i would be able to do a request to the Power BI API for a "Export Report as PDF File where customerid="1001" or whatever other parameter i want?

 

Or is this an impossible scenario?


Also, what sort of Power BI/Azure licenses,services and subscriptions would this required?











2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @chillguin ,

 

Here is the same thread for your reference, which is discussed in detail:

https://community.powerbi.com/t5/Developer/Export-to-file-Power-BI-Report-with-Filters-Parameters/m-... 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

You can specify a report level filter, or a collection of bookmarks. You can also specify a collection of report pages if you don't want to export all pages.

 

Export report to PDF, PPTX and PNG files using Power BI REST API (Preview) | Microsoft Power BI Blog...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.