Forum Discussion
Anonymous
2 years agoNot applicable
Migrating reports (embedded in model-driven apps) to different environments
Hello,
I built a few reports and embedded them into a model-driven app. My data source is common data service (legacy), everything is working fine on my dev environment but what is the best approach to migrating to different environments?
I noticed others asked the question but it was years ago so wanted to see if there was a new solution to this.
Thanks
1 Reply
- SamInogicSuper User
Hi,
1) Prepare Everything in Dev
- Ensure your Power BI report is published to a Power BI workspace and working correctly in Dev.
- Enable Power BI embedding in the environment settings in Power Apps admin center (if not already).
- In your model-driven app designer, confirm the embedded report is added as a Power BI embedded page or dashboard.
2) Create a Solution for Migration
Power Platform migrations work best if all components are in a Solution.
- In Power Apps, go to Solutions → New Solution.
- Give it a Name, Publisher, Version.
- Save.
3) Add App + Report to the Solution
- Open the solution you just created.
- Click Add existing → App → Model-driven app.
- Select your model-driven app.
- Also Add existing Power BI report or dashboard that’s turned into a Power BI embedded system dashboard.
4) Use Environment Variables for Report & Workspace
To avoid having to manually re-embed the report in each environment:
- While adding the Power BI embedded dashboard in the solution, enable the Use environment variable option.
- Create variables like:
- Workspace ID / name
- Report ID / name
- Set default/current values for your Dev environment here.
- These variables let you map to different workspaces & Power BI reports per environment (Dev, Test, Prod).
? Why? Because the actual workspace/report names and IDs change across environments and environment variables let you configure them after import.
5) Export the Solution
- In the Dev environment, click Export on your Solution.
- Choose Managed if deploying to Production; Unmanaged for Test or Dev-like environments.
- Download the .zip file.
6) Import into Target (Test/Prod) Environment
- Switch to the target environment in Power Apps.
- Go to Solutions → Import Solution.
- Upload the .zip you exported.
- During import, you’ll be prompted to provide values for environment variables – here you pick the Test/Prod workspace and report that correspond to this environment.
7) Validate & Publish
- After import, publish your solution.
- Open the model-driven app in the target environment.
- Test that the Power BI report appears and loads correctly.
Hope this helps.Thanks!