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
JAnder
Helper I
Helper I

Change Paginated Report Dataset (programatically)

Currently I have a number of paginated reports all connecting to a dataset, these are being used as embedded reports. Is there a way to update the dataset without having to then download all of my reports and manually change the dataset it connects to?

 

With normal reports, we can simply rebind them using the RestAPI, but this does not seem to be available for paginated. If you attempt to do so you get an error PowerBIOperationNotSupported

 

I have also tried just passing in the new datasetID for the embed token, but I get an error quoting the old dataset ID saying this is required. If I pass in the new and old datasetIds in the embed token request I get a not found error because the old dataset no longer exists.

10 REPLIES 10
Mistralou
Frequent Visitor

Hello @JAnder 

Your topic got my attention

I'm indeed facing the same difficulties that you mentionned and was wondering if you found a way to switch paginated report dataset using the API? (my paginated point to PBI Dataset)

Kind regards,

Jérémie

Sorry for the late reply, unfortunately I did not find a way around it. We still have to revoke deployed paginated reports and rebind them manually, then re-import them.

JAnder
Helper I
Helper I

Thanks Xiaoxin

I had a look there and it talks about the usable datasources and it does say that it does not support sharing the dataset. So should I take this to mean, at this time, if a paginated report is using a power bi dataset and the dataset changes (therefore ID changes), the report is broken and will need taken back to the report builder?

 

It's a shame as we went for a solution with multiple reports into a single dataset, so the workload generated by not being able to just update the datasource like with other reports is quite large.

 

Thanks

Hi @JAnder ,

 

From paginated report perspective the dataset is just one of its data sources.

For modifying the data sources of a Paginated report (including Power BI dataset) you have this API:

https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group

 

 

Hi @AmosHersch 

 

That looks like exactly what I am after. The docs only mention server/database though, no mention of passing in a DatasetId. Are datasets supported but not documented?

 

Thanks very much

 

@JAnder AFAIK it should be supported. The documentation isn't very rich.

I would try to first call an API to get the current datasource Reports - Get Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn, it might help you understand how the database and server shoud look like for a data source of this kind

Having looked at the datasource, the dataset Id I need changed is appended to the Database name, however if I change that to the new Id as part of a UpdateRDLDatasourcesRequest I get an unauthorised response. I am using a service principal with control over both that report and dataset so thinking that is just not an expected operation.

 

Update datasource <name> is unauthorized"

 

 

The user (or Service Principal) calling the API to update the data source must be the "owner" of the data source itself.  Is it possible that the caller isn't the dataset owner ?

No it is definitely the dataset owner. I suspect though that setting the database value to the virtual server name + datasetid (which is the value we see when we retrieve datasource) is the wrong way to go. There must be some kind of provisioning step before that in the API backend to create the database, or database facade as it may be.

 

Just to show I am sure about it being owned by the Service Principal

This dataset has been configured by <redacted> Service Principal Object ID <redacted>. Would you like to take over the settings?

v-shex-msft
Community Support
Community Support

Hi @JAnder,

You can take a look at the following document about create embedded data source for paginated report if it suitable for your requirements:

Create embedded data sources for paginated reports in the Power BI service - Power BI | Microsoft Le...

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.