[Power BI - Embedded Reports] How to get this working on mobile app?

Forge Component
Published on 2019-10-20 by William Antunes
0 votes
Published on 2019-10-20 by William Antunes

Thanks very much for the component. Got it working on web. 

How to get this working on mobile app?

Currently, the web block cannot be used in mobile app. I tried to create from scratch and found out the expression in mobile app does not have "escape" option.

Could you please guide me how to get this working on mobile?

Much appreciated.


Hi George,

To accomplish escape content in mobile you need to use javascript widget with something like this>

document.getElementById($parameters.ContainerId).innerHTML = $parameters.Content

If you still need some help let me know.



Hi Marcelo,

Unfortunately, I couldn't get the mobile app working. I get the below error:

It seems the error is coming from the powerbi-client v2.2.3 javascript, as I copied from your web block to mobile app.

It would be good if you can share a mobile app demo, just like what you have done for the desktop demo.

Much appreciated for your help.




OK, got it working now.

Basically, I followed the official example from: https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#

1, copy javascript code from: https://github.com/microsoft/PowerBI-JavaScript/blob/master/dist/powerbi.js and put it into mobile module.

2. reference this JavaScript in the "Required Scripts" in the mobile page

3. In the mobile page, create a client action and use the JavaScript component and write the code:

4. dont forget your page should have a container with the name matched your javascript code , as shown above

var embedContainer = document.getElementById('<your custom container name>');

5. deploy and run. it should work

Forgot to mention, those token and url etc, you need to call the server action coming from the module PowerBI_IS