I'm attempting to develop an embedded Power BI report and have faced a number of issues. My starting point was to follow the Microsoft guidance as laid out here:
https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/add-analytics-tab-workspaces?toc=%2Ffin-and-ops%2Ftoc.json
Whilst attempting to debug the issues I was having I made some surprising discoveries:
- Microsoft's stated method to use - PBIReportHelper::initializeReportControl - is deprecated, and we should be using a new version - PBIReportHelper::initializeReportControlv2.
- PBIReportHelper::initializeReportControlv2 is never used in Microsoft's code.
- PBIReportHelper::initializeReportControl is only used three times in Microsoft's code, and not for any of the main examples I looked at.
Based on the above, my question is as follows:
How should we initialise an embedded Power BI report? Should we be using the method as recommended, or should we be using a totally different approach? If so, what?