Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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:
The display of the dataset that did not work:
with the console.log answer:
Then the one which works:
with his console.log answer:
On the report that does not display I have these error in the console:
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.
Solved! Go to Solution.
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
}
};
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
}
};
User | Count |
---|---|
64 | |
27 | |
25 | |
17 | |
11 |