Forum Discussion
config pageName, load/render functions
- 8 years ago
Hi m4pv,
According to your description above, I have tested it a few times. The default page option in config works fine for me without any issue?
Note that the value set for the pageName should be real report name(but not the display name of the report page) which you can find from the report url on Power BI service.
https://app.powerbi.com/groups/7d855170-da1f-43aa-9c40-475f7d84ff4c/reports/9622bdcd-eef4-4ec1-880f-3916bb7d471c/ReportSection
In addition, if the issue persists, I would suggest you create a new issue here for better assistance. :smileyhappy:
Regards
Hi m4pv,
According to your description above, I have tested it a few times. The default page option in config works fine for me without any issue?
Note that the value set for the pageName should be real report name(but not the display name of the report page) which you can find from the report url on Power BI service.
https://app.powerbi.com/groups/7d855170-da1f-43aa-9c40-475f7d84ff4c/reports/9622bdcd-eef4-4ec1-880f-3916bb7d471c/ReportSection
In addition, if the issue persists, I would suggest you create a new issue here for better assistance. :smileyhappy:
Regards
Hi v-ljerr-msft
The problem with 1st method was indeed the fact that i was assigning .displaName to config.pageName and not the .name value.
Is there a way to either set actual tab names (in pbi desktop or pbi service) or get them programmatically prior loading the report object? Getting these from url is not an option.
I don't see what was the issue with 2nd method (load / render / pages[0].isActive / pages[0].setActive() functions). Perhaps it's related to this bug. So for now i just get a real name value and use it to add to config:
report.on('loaded', function () {
report.getPages()
.then(function (pages) {
config.pageName = pages[pageIndex].name
report.render(config);
})
.catch(function (errors) {
Log.log(errors);
});
});Hopefully that will work.
Thanks