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
acraft
New Member

Export to file and dynamic bind dataset

I'm using PowerBI embeded to reports, I have multiple datasets for the same report and use dynamic binding  at display depending on the user. (https://azure.microsoft.com/en-gb/updates/power-bi-embedded-dynamic-binding/)

 

I want to export these reports to pdf/pptx and I'm using the ExportReport command in the rest API (https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exportreportingroup). I can see no way to set the dataset to bind.

 

Is the only option to rebind the report before exporting? If I do that do I have to wait for the export to complete before i export the next if i need to rebind again, effectively queuing all the requests?

 

thanks

6 REPLIES 6
Anonymous
Not applicable

This should be possible now for certain file types (I tested using PDF).

 

The Export To File In Group endpoint now supports a datasetToBind field:

Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

There seems to be a similar field for Export to File:

Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

This can be used to specify the dataset ID that you want to dynamically bind your report to. I have tested Export To File In Group with a dataset that is in a different workspace to my report and the API call was able to resolve the workspaceId of the dataset automatically. 

 

Keep in mind that you may need to update your Power BI client library in order to access this field. I am using the .NET client and needed to update to version 4.10.0:

 NuGet Gallery | Microsoft.PowerBI.Api 4.10.0

Does this really work? Because I receive a Report with "Something's wrong with one or more fields" when I try to do this.

huychau
New Member

@acraft , @annwallinger have you managed to solve this one?

We are facing the same issue and got no clue to move on.

Microsoft, please help.

This it currently not possible. The report is always exported with the original dataset it's bound to.

Such a support might be added in the future for "Export to File" REST API (export to PDF/PPTX/PNG). I don't know if it will be supported for export to PBIX.

Thank you Amos, for your response.

annwallinger
New Member

@acraft did you ever sort this out? I need to do the same thing and have the same question you raised.

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.