Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Deploy embedded PowerBI report on Main form

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?

  • Suggested answer
    NODAL Profile Picture
    NODAL 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

  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 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

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,946 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,426 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans