Forum Discussion

desarrollosbi's avatar
desarrollosbi
Frequent Visitor
6 years ago

iframe or link mobil optimize

how to insert an iframe or link and allow to visualize the mobile configuration check example: corona.dataclue.bi

 

Regards

Thanks

JaBI

5 Replies

  • avatorl's avatar
    avatorl
    Impactful Individual

    desarrollosbi 

    The report in your example it's a 'Publish to Web' URL embeded into iframe.

    'Publish to web' feature doesn't support native mobile view (created in Power BI Desktop using 'Mobile layout'). So, for https://corona.dataclue.bi/ they created 2 different reports: one for desktop devices and one for mobile devices.
    Thre is a Java Script on this web page to detect device type and to load into iframe either desktop report or mobile report (yellow and green links are different, it's 2 different reports) automatically.




    And on https://corona.dataclue.bi/mobile/ page there is no Java Script, mobile version of the report is embedded into this page.

     

    'See mobile version' link on https://corona.dataclue.bi/ is just a link to an external web page - https://corona.dataclue.bi/mobile/.

    And their 'mobile' version of the report is just a regular Power BI report with modified page size, something like this:

     

    It's just a workaround, not perfect, but native 'mobile layout' won't work with Publish to Web anyway.

    And there is no need to create 2 separate report. You can have designited page in your report adapted (by changing page size) for mobile devices. Then just use pageName parameter to load certain page into iframe. On the https://corona.dataclue.bi/ java script loads either 'desktop' or 'mobile' report into iframe, but you can to load either desktop opimized page or mobile optimized page of the same report. Read more about pageName parameter in my article on my blog: URL based navigation for a report shared via ‘Publish to Web’ 

    • nokia447's avatar
      nokia447
      Frequent Visitor

      Hi

      I tried this, and I can't get it to work. The report  https://corona.dataclue.bi/mobile/ scrolls vertical very nice within the page. So it it actually higher than 500. I think the size is more like 350x3000. But when I do use that size the report is fitted into one page, no scrolling possible. This makes it "thin & high". 

      Any ideas how to achieve same scrolling as here: https://corona.dataclue.bi/mobile/

       

      /