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
KoenC
Frequent Visitor

MobilePortrait layout type doesn't work when embedding a report

The used configuration.
{
    type: 'report',
    id: report_id,
    pageName: page_id,
    embedUrl: 'https://app.powerbi.com/reportEmbed',
    tokenType: models.TokenType.Aad,
    accessToken: token,
    filters: filters,
    permissions: models.Permissions.Read,
    settings: {
        filterPaneEnabled: false,
        navContentPaneEnabled: false,
        background: models.BackgroundType.Transparent,
        layoutType: models.LayoutType.MobilePortrait
    }
};

The iframe src attribute gets the parameter 'isMobile=true', so the configuration is parsed correctly.
No javascript errors are thrown.

But the report is still shown with the 'Master' layout type.

1 REPLY 1
RishabhRathod
New Member

I dont know if this will help you now, I was stuck on this today and found the solution as follows:

 

{
    type: 'report',
    id: report_id,
    pageName: page_id,
    embedUrl: 'https://app.powerbi.com/reportEmbed',
    tokenType: models.TokenType.Aad,
    accessToken: token,
    filters: filters,
    permissions: models.Permissions.Read,
    settings: {
        filterPaneEnabled: false,
        navContentPaneEnabled: false,
        layoutType: 2
    }
};

 

Changing the layoutType to 2 will render it in mobile portrait mode, give it a try should solve your problem.

Spoiler
You do not require any additional paramaters in embed url for mobile view

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.