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
Hi,
I need to embed a specific page on report load in Angular 4.
I am using the following snippet to get pages of the report so that i can then choose a specific page out of those. I don't want to hard code the page name.
this.report.on('loaded', function () {
this.report.getPages().then(function (pages) {
pages[1].setActive();
});
});
Error Received: ERROR TypeError: Cannot read property 'getPages' of undefined
Can anyone help me in resolving it.
Prateek Raina
The error messages seems a little odd.
Have you installed the Microsoft.PowerBI.JavaScript package?
https://github.com/Microsoft/PowerBI-JavaScript
Besides, try:
report.on('loaded', () => {
report.getPages().then(pages => pages[1].setActive());
});
Regards,
Michael
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |