web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Deploy embedded PowerBI report on Main form

(0) ShareShare
ReportReport
Posted on by 5

Hi Community,

We have created PowerBI report that is embedded on a main form of Model driven app. This report is contextually filtered based on the record it is opened from. 
We have followed this MS doc to embed(this involves editing the customization.xml file to add parameters like reportID , groupId, filter,titleUrl): 

https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/embed-powerbi-report-in-system-form#embed-with-contextual-filtering

We have three different workspace setup DEV -> UAT -> PROD hence the reportId and groupId and other parameters differ for each workspace.

PAINPOINT :Each time when the form containing the embedded PowerBI report has to be promoted to higher environment in dynamics , these report parameters have to be edited in customisation.xml as per the environment it is getting promoted to. 
Is there a cleaner approach to handle this situation?

I have the same question (0)
  • Suggested answer
    Pradeep Rai Profile Picture
    5,489 Moderator on at
    RE: Deploy embedded PowerBI report on Main form

    Hi,

    I would suggest to post the question in below forum:
    https://community.powerbi.com/t5/Forums/ct-p/PBI_Comm_Forums

  • Suggested answer
    NODAL Profile Picture
    860 on at
    RE: Deploy embedded PowerBI report on Main form

    Hi Anureet,

    You can follow below steps.

    1. configure any values in formxml (customization.xml)
    2. store environment specific details [PowerBiGroupId,ReportID and TileUrl in a reference table / environment variable
    3. on load of form write the js to override the values with values stored in step 2

    //unfilteredreport is the name of PBI report control
    formContext.getControl("unfilteredreport").controlDescriptor.Parameters["PowerBIGroupId"]="28fd43c-b901-4629-b3dd-923a783863ef";
    formContext.getControl("unfilteredreport").controlDescriptor.Parameters["PowerBIReportId"]="da4730ef-da58-48ce-bcd4-4ea4ef45307d";
    formContext.getControl("unfilteredreport").controlDescriptor.Parameters["TileUrl"]="https://app.powerbi.com/reportEmbed?reportId=da4730ef-da58-48ce-bcd4-4ea4ef45307d";
    formContext.getControl("unfilteredreport").setVisible(true);

    Note : hide the report control by default on the form and show only after setting environment specific values

    Thanks,

    Ketan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 110 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 73

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans