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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Farzad1117
New Member

ExportTo REST API PDF fails to render visuals for DirectQuery dataset

I am using the ExportTo REST API to generate PDFs from a Power BI report hosted in a Premium/Fabric workspace.

Scenario

The report uses a DirectQuery dataset.

When exporting via the REST API (PDF), the PDF is generated, but all visuals are empty

Questions 

Is this a known DirectQuery limitation for the ExportTo API?

Are there any official references/documentation confirming this behavior?

What is the recommended approach to reliably export PDFs from DirectQuery report                                                

Additional Info:

I am using Python with MSAL for authentication.

Workspace is in Premium/Fabric capacity

1 ACCEPTED SOLUTION
Poojara_D12
Super User
Super User

Hi @Farzad1117 

This is a known and by-design limitation: the ExportTo (PDF / image) REST API does not support DirectQuery datasets, so when the service tries to render the report in the background export engine it cannot execute the live queries and you get a “successful” PDF with blank visuals. This is documented in Microsoft’s ExportTo and paginated report docs where DirectQuery and some live connections are explicitly excluded from background export and rendering. The only reliable ways to generate PDFs from DirectQuery data today are to use Paginated Reports (RDL) against the same source, or switch the semantic model to Import or Hybrid (with cached tables) so the export engine can read data without opening live connections. If you must keep DirectQuery for interactive reports, the standard pattern is a separate Import/Hybrid model or paginated report purely for exports and automation.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

3 REPLIES 3
Poojara_D12
Super User
Super User

Hi @Farzad1117 

This is a known and by-design limitation: the ExportTo (PDF / image) REST API does not support DirectQuery datasets, so when the service tries to render the report in the background export engine it cannot execute the live queries and you get a “successful” PDF with blank visuals. This is documented in Microsoft’s ExportTo and paginated report docs where DirectQuery and some live connections are explicitly excluded from background export and rendering. The only reliable ways to generate PDFs from DirectQuery data today are to use Paginated Reports (RDL) against the same source, or switch the semantic model to Import or Hybrid (with cached tables) so the export engine can read data without opening live connections. If you must keep DirectQuery for interactive reports, the standard pattern is a separate Import/Hybrid model or paginated report purely for exports and automation.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
lbendlin
Super User
Super User

Your visuals are rendering too slowly. Make them render faster.

tayloramy
Community Champion
Community Champion

Hi @Farzad1117

 

What happens if you generate a second PDF right after the first one? 

I've noticed that when using directlake models, the first export is usually old data/empty and then the second export works as expected. Perhaps that is also an issue with directQuery? 

 

When calling the API, are you using any filters at all? 

 

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.