1
votes

I've recently published a specific PowerBI report and despite creating a 'Phone' View on PowerBI Desktop this didn't show up in the final embed code.

I've looked into PowerBI Embedded Playground and managed to generate the relevant access tokens and even try it out, but still couldn't figure out how to modify the code in such a way to generate a mobile view.

The questions and answers below somehow didn't give me the insight I needed, still somehow need some additional work:

Mobile view is not being shown for embedded powerbi report

Create Report in Embed View via PowerBI API

Power BI RS web embedding in mobile web browser

What do I need to do to get started? Which documentation do I need to look into exactly? I need to embed this report in a Sharepoint 2010 Page and I need it to be mobile responsive on page load and not via a seperate link.

1

1 Answers

2
votes

This isn't related to the access token in any way. It is generated before configuring the embedding process. To embed the report in phone view, you must specify MobilePortrait layout type in the embed configuration, i.e. something like this:

var config = {
    .....
    settings: {
        filterPaneEnabled: true,
        navContentPaneEnabled: true,
        layoutType: models.LayoutType.MobilePortrait <-- THIS ONE
    }
};

If you omit layoutType, it will be shown in the landscape view (i.e. like in the desktop). For more information about the configuration see Embed Configuration Details, and for embedding in general you should start from Embedding Basics.