Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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
Solved! Go to Solution.
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.
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.
Your visuals are rendering too slowly. Make them render faster.
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?
Proud to be a Super User! | |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 9 | |
| 8 | |
| 8 |
| User | Count |
|---|---|
| 30 | |
| 29 | |
| 20 | |
| 15 | |
| 15 |