Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Im trying to embed a report for mobile and using the new property
settings: { layoutType: models.LayoutType.MobilePortrait }
found here: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile
However, the report (which once loaded just fine) now kicks off an error:
Cannot read property 'MobilePortrait' of undefined.
Anyone have any ideas?
Solved! Go to Solution.
I first built my site to host my embedded dashboards in September of 2017. When I built the page that hosts the embedded reports themselves I cloned the PowerBi report library from GitHub and placed it the sites static file directory. To fix my problem, I cloned the most recent version of the Power Bi library and replaced the existing static files. I reloaded my static files and refreshed my server and everything works now.
Yes, I just did tonight and still the same error:
Cannot read property 'MobilePortrait' of undefined
Code:
const newSettings = {
layoutType: models.LayoutType.MobilePortrait,
pageView: "oneColumn"
};
dashboard.updateSettings(newSettings);
I'm getting the same error
Edit: I was able to fix my error by updating the Power Bi static files in my repo
Hey Adam,
Can you illustrate what steps you took to do this? I am very interested and im sure others are as well!
Thank you! Glad you got it to work on your side!
I first built my site to host my embedded dashboards in September of 2017. When I built the page that hosts the embedded reports themselves I cloned the PowerBi report library from GitHub and placed it the sites static file directory. To fix my problem, I cloned the most recent version of the Power Bi library and replaced the existing static files. I reloaded my static files and refreshed my server and everything works now.
Pro tip: when replacing the powerbi.js file be sure to wipe your cache.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
1 |