Damo
Damo

Reputation: 2070

Cannot embed a paginated report unless it is created in Power BI Report Builder

I have been chasing my tail all day on this, only to find it is down to how the report is created.

We are in the process of migrating to Power BI embedded for our reporting. One test we're conducting is embedding paginated reports in our web app.

We have found a difference between embedding a report created via Power BI Online, using an existing dataset and creating a report from the desktop report builder.

For simplicity, we've replicated the issue using the developer samples. https://github.com/microsoft/PowerBI-Developer-Samples

If I create the report on the desktop app, I can embed the report. If I create it online, it's not recognised correctly as a paginated report and, therefore, fails to load.

The issue occurs at IReportOperations.GenerateTokenInGroup (GetEmbedTokenForRDLReport, Embed service.cs)

"InvalidRequest:Embedding a Paginated report with Power BI Dataset as a datasource is not supported with V1 embed token"

I understand the message, but I don't understand why the difference in response is based on how the paginated report was created. The only change between a working report and a non-working one is the report ID.

Both reports work in the Power BI online app.

Is there a fundamental difference between a report created online vs via the desktop app?

 public static async Task<EmbedToken> GetEmbedTokenForRDLReport(Guid targetWorkspaceId, Guid reportId, string accessLevel = "view")
 {
     using (var pbiClient = await GetPowerBiClient())
     {
         EmbedToken embedToken = null;

         // Generate token request for RDL Report
         var generateTokenRequestParameters = new GenerateTokenRequest(
             accessLevel: accessLevel
         );

         try
         {
             embedToken = pbiClient.Reports.GenerateTokenInGroup(targetWorkspaceId, reportId, generateTokenRequestParameters);
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex);
             throw;
         }
         // Generate Embed token
      

    
         return embedToken;
     }
 }

Error

Upvotes: 2

Views: 1585

Answers (2)

Krishanu Majumder
Krishanu Majumder

Reputation: 41

Please refer to the link, it suggests: If you have a paginated report with a Power BI dataset as a data source you should use V2 embed token

Upvotes: 0

Madhav Chittlangia
Madhav Chittlangia

Reputation: 146

The reason behind the issue that you are facing could be because of some access/settings of your workspace where your report is present or because of some API Permissions in the azure application that you created.

Verify the following: 

  1. Make sure that the workspace in which your report is present has the azure application added as the service principal and also that you are the admin or at least the member of the workspace. 

enter image description here

  1. Make sure you check the permissions within your azure application which you created. 

enter image description here

Please refer to the following documentations

powerbi-docs/powerbi-docs/developer/embedded/embed-paginated-reports-customers.md at live · MicrosoftDocs/powerbi-docs (github.com)

Embed paginated reports in your Power BI embedded analytics application - Power BI | Microsoft Learn

If the issue still persists even after thorough verification of the mentioned steps, please provide additional details so that we may assist you further.

Upvotes: 0

Related Questions