While attempting to integrate a Power BI report with Angular 7, I encountered an unexpected error when trying to configure the settings of the report. The error message stated:
Type '{ filterPaneEnabled: boolean; navContentPaneEnabled: boolean; }' has no properties in common with type 'ISettings'.
Here is my embedding code:
var config = {
type: 'report',
tokenType: pbi.models.TokenType.Embed,
id: <report-id>,
embedUrl:<embedURL>,
accessToken: <accessToken>,
settings:{
filterPaneEnabled:false,
navContentPaneEnabled: false,
}
}
let reportContainer = <HTMLElement>document.getElementById('pbi-container');
let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
let report = powerbi.embed(reportContainer, config);
In addition, I attempted to embed the report using regular JavaScript and it worked without any issues.