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
kd_61
Frequent Visitor

Embedding Paginated Report with AppOwnsData and data gateway

I am following the tutorial for embedding a paginated report in my application. I am using the AppOwnsData sample on Github to test, and have supplied all the required settings and am using service principal as recommended. The application displays the error "Value cannot be null. (Parameter 'input')". The sample app crashes on line 52 of PbiEmbedService.cs

datasetIds.Add(Guid.Parse(pbiReport.DatasetId));

It is expecting a datasetId, but the PowerBiClient instance does not supply this parameter value (it does show other property values though like report name and report Id). I am not sure where the application, or I, would go about finding a dataset Id. We are using an on-pemises data gateway for Power BI Online and SQL Server. The reports display just fine in Power BI Online, but because of the data gateway there aren't any embedded datasets from which to obtain an Id. Are there any limitations for AppOwnsData and the on-premises data gateway?

1 ACCEPTED SOLUTION
kd_61
Frequent Visitor

I solved this by downgrading the microsoft.powerbi.api nuget package from version 3.x to version 2.x. You can refer to the github issue thread for more information.

View solution in original post

3 REPLIES 3
kd_61
Frequent Visitor

I solved this by downgrading the microsoft.powerbi.api nuget package from version 3.x to version 2.x. You can refer to the github issue thread for more information.

v-yiruan-msft
Community Support
Community Support

Hi @kd_61 ,

What data source the paginated report is using? Is it a data set? If the related report was created base on the shared dataset, you can't embed it in the "App Owns Data" scenario... Please find the following documentation for the details.

Limitations and considerations

If it is a normal report, you can refer the below blog to get the dataset id.

How to find a Dataset ID in Power BI

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yiruan-msft 

I am creating the reports in Power BI Report Builder and using a Miscrosoft SQL Server datasource. When I publish the reports, the datasets from the SQL Server datasource are not getting embedded with the report. Because we have the power bi on-premises gateway installed, I am able to view the published reports in Power BI Online. However, since the datasets from the SQL server datasource do not get embedded during pulish, they do not appear in the datasets section of Power BI online and I cannot get a dataset Id as described in the link you shared.

I understand that there is a limitation for using Power BI shared datasets in AppOwnsData scenarios. Is there also a limitation for using SQL Server datasources with a gateway?

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.