Forum Discussion

Sachinkotnala7's avatar
Sachinkotnala7
New Member
8 years ago

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 -

 

 

 

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

2 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft 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

    • Sachinkotnala7's avatar
      Sachinkotnala7
      New Member

      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.