This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I noticed an underlying problem where the UpdateSettings method exposed by the Javascript library does not actually affect any change to the report specified. I confirmed that the method itself was not failing, just that it essentially wasn’t working. I made sure that I was using the latest version of the library (2.5.0) and even downgraded a minor version to compare and still faced the same issue. I followed the guidelines strictly that were laid out on the Wiki page and tried a few obvious alternatives without any luck. This is in regards to embedding PowerBI in an Iframe.
Can anyone provide feedback on why this might not be working?
Here's a code snippet of the function I was calling:
let embedContainer = $('#reportContainer')[0];
let models = window['powerbi-client'].models;
let defaultLayout = {
displayState: {
mode: models.VisualContainerDisplayMode.Hidden
}
};
let pageSize = {
type: models.PageSizeType.Custom
};
let pageLayout = {
defaultLayout: defaultLayout,
visualsLayout: {}
};
let settings = {
filterPaneEnabled: false,
navContentPaneEnabled: false,
layoutType: models.LayoutType.Custom,
customLayout: {
pageSize: pageSize,
displayOption: models.DisplayOption.FitToPage,
pagesLayout: {
"ReportSection3": pageLayout
}
}
}
report = powerbi.get(embedContainer);
report.updateSettings(settings)
.catch(function (error) {
Log.log(errors);
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.