Forum Discussion
Scroll bar will not appear in embedded report
- Anonymous3 years ago
Hi asbpowerbi ,
Here I suggest you to try adding the "displayOption" property with value "FitToWidth" in customLayout object, as this option will try to fit the report as per the total available size for the page and will introduce a scrollbar for the remaining part if necessary.
Also change "Widescreen" to "Custom" in pageSizeType object.
You can refer to this code.
var embedConfiguration = { type: 'report', id: '{{txtembedreportid}}', embedUrl: '{{txtreportembed}}', tokenType: models.TokenType.Embed, accessToken: '{{txtaccesstoken}}', settings: { layoutType: models.LayoutType.Custom, customLayout: { displayOption: models.DisplayOption.FitToWidth, // Add "FitToWidth" pageSize: { type: models.PageSizeType.Custom, // Change to "Custom" } }, panes:{ bookmarks: { visible: false }, fields: { expanded: false }, filters: { expanded: false, visible: false }, pageNavigation: { visible: true }, selection: { visible: true }, syncSlicers: { visible: true }, visualizations: { expanded: false } } } };For reference: Personalize a report layout
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi asbpowerbi ,
Here I suggest you to try adding the "displayOption" property with value "FitToWidth" in customLayout object, as this option will try to fit the report as per the total available size for the page and will introduce a scrollbar for the remaining part if necessary.
Also change "Widescreen" to "Custom" in pageSizeType object.
You can refer to this code.
var embedConfiguration = {
type: 'report',
id: '{{txtembedreportid}}',
embedUrl: '{{txtreportembed}}',
tokenType: models.TokenType.Embed,
accessToken: '{{txtaccesstoken}}',
settings: {
layoutType: models.LayoutType.Custom,
customLayout: {
displayOption: models.DisplayOption.FitToWidth, // Add "FitToWidth"
pageSize: {
type: models.PageSizeType.Custom, // Change to "Custom"
}
},
panes:{
bookmarks: {
visible: false
},
fields: {
expanded: false
},
filters: {
expanded: false,
visible: false
},
pageNavigation: {
visible: true
},
selection: {
visible: true
},
syncSlicers: {
visible: true
},
visualizations: {
expanded: false
}
}
}
};
For reference: Personalize a report layout
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.