Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MattCalderwood
Responsive Resident
Responsive Resident

Report 'getPages' returns incorrect report-page dimensions if embedded container is reused.

Hi All,


I am adding some performance improvements to an embedded project that is using React.
One part of this, is reusing the report container for multiple reports rather than throwing it away and starting the render process from scratch (similar to bootstrapping: https://github.com/microsoft/PowerBI-JavaScript/wiki/Bootstrap-For-Better-Performance ).

This is all working well, with one exception..
A call to report.GetPages() will return the correct page array but with potentially incorrect defaultSize properties.

Whichever report gets rendered first... the width and height dimensions from this report will 'stick'!
Any further reports that get rendered, will pull back their correct page array - but each page will contain the dimensions from the first page of the previous/original report.

Anyone got any ideas what might be causing this? Or is this a bug in the embedding api?
Many Thanks,

Matt

1 ACCEPTED SOLUTION
MattCalderwood
Responsive Resident
Responsive Resident

This looks llike it is very closely related to another question that I raised, so i'm closing this one down.
If you are having the same/similar issue -> follow on this thread....

https://community.powerbi.com/t5/Developer/Reusing-IFrame-for-multiple-reports-results-in-incorrect-...

 

Thanks,
Matt

View solution in original post

1 REPLY 1
MattCalderwood
Responsive Resident
Responsive Resident

This looks llike it is very closely related to another question that I raised, so i'm closing this one down.
If you are having the same/similar issue -> follow on this thread....

https://community.powerbi.com/t5/Developer/Reusing-IFrame-for-multiple-reports-results-in-incorrect-...

 

Thanks,
Matt

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.