Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BIReady
New Member

Use dynamic Binding to display report but report does not display

HI,

 

We have a webSite that is used to display several reports to several customer. Each customer has his own database, but all DB have exactly the same schema.

We want to use only one report with dynamic binding dataset to display the good datas to the good customer.

We followed this article: https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/bind-report-datasets 

I have created a test environment with 2 Azure SQL DB. I have a simple report in my workspace (bind on one of the DB). Then I have created another pbix just with the other dataset for the second DB (in the same workspace)

 

When I ask for the token with the dynamic dataset, I have no error in the back code (token correctly created and object ReportEmbedConfig fully filled with the reports links)  whatever the DB I want to use. But in the front, for the first DB (where I created the report) it works well, but on the second one I have a blank page after a while.

 

Here my configuration for PowerBi:

BIReady_0-1632163320082.png

 

The display of the dataset that did not work:

BIReady_1-1632163464461.png

 

with the console.log answer: 

BIReady_4-1632163974773.png

 

 

 

 

Then the one which works:

BIReady_2-1632163498459.png

with his console.log answer:

BIReady_3-1632163822245.png

 

 

On the report that does not display I have these error in the console:

BIReady_5-1632164226094.png

But all the permissions are the same on each DB, the workspace is the same and the datasets have been created exactly with the same parameters.

 

Any idea of what happened? How can I debug it better?

Thanks by advance.

 

1 ACCEPTED SOLUTION
BIReady
New Member

I finally found the problem. In my config in JS I forgot to set the datasetBinding:

 

const config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.All,
datasetBinding: {
datasetId: data.dataSetId,
},
datasetId: data.dataSetId, // The dataset id that you want the report to use
settings: {
// Enable this setting to remove gray shoulders from embedded report
// background: models.BackgroundType.Transparent,
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};

 

View solution in original post

1 REPLY 1
BIReady
New Member

I finally found the problem. In my config in JS I forgot to set the datasetBinding:

 

const config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.All,
datasetBinding: {
datasetId: data.dataSetId,
},
datasetId: data.dataSetId, // The dataset id that you want the report to use
settings: {
// Enable this setting to remove gray shoulders from embedded report
// background: models.BackgroundType.Transparent,
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors