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
Sachinkotnala7
New Member

Embedded powerbi report- Default layout not working when mobile portrait and landscape is in use.

I am trying to build an application which supports mobile as well as the desktop view of Power BI report. As per my understanding from article Embed a report in mobile layout, by default, report should be in landscape mode. Following the given guidelines, I am able to switch between mobile portrait view and mobile Landscape view in power bi embedded. However, during testing, I noticed that the reports in my application don't have defined mobile layout will throw an error. If Iayouttype in config setting value is 0 or 1 (master or custom), then all my reports will display an output in landscape mode even in mobile view without throwing any error. In another case, if I use layout type value is 2 or 3 (portrait or landscape mode) then mobile layout portrait and landscape features are preserved but throw an error for other reports which are not configured for mobile layout. 

I am using powerbi.js version 2.6 . 

Sample piece of code -

 

 

 

image.png

Error - when layout type is MobilePotrait or landscape but other reports are not optimise for mobile.Capture.PNG

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Sachinkotnala7,

 

Seems the error isn't related to the code here. Did you still get the report in default layout? I would suggest you create mobile layout if you want to embed mobile view.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Dale,

@v-jiascu-msft

Thanks for your reply.

Actually, I have two types of reports in my application, one of the reports type is in default layout and another one is configured in mobile layout. Currently, I can achieve only one functionality at a time. If I set layoutType as default initially then updatesetting is not able to update layout for mobile portrait or landscape mode but I can view both types of the report in the default view.

In other cases, if default layoutType is MobilePotrait or MobileLandscape, then I am able to view only a report configured for mobile layout and error will be generated for rest of the reports which were not configured for mobile layout.
I want to achieve functionality where if any of the reports is not configured for mobile, then I should be able to see default layout. However, if a report is configured for mobile layout, then I should be able to see a mobile portrait or landscape layout depending on device orientation.

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.