Forum Discussion
Pieter_BE
4 years agoNew Member
WinForms WebView2 Embedded PowerBI
Hi, We are using PowerBI Embedded in a .NET 4.8 WinForms application. For integrating the webpage, we use WebView2. Since a few days our application is unable to show the reports. (No code c...
- 4 years ago
Problem solved itself!
I assume it was a bug related to the june release.
Pieter_BE
4 years agoNew Member
This is the HTML that is used:
accesToken / embedUrl / reportId has to be filled in to work.
<html>
<head>
<script src=""https://cdnjs.cloudflare.com/ajax/libs/powerbi-client/2.14.1/powerbi.min.js""></script>
</head>
<body>
<div id=""reportContainer""/>
<script>
var accessToken = ""{accessToken}"";
var embedUrl = ""{embedUrl}"";
var embedReportId = ""{reportId}"";
var models = window['powerbi-client'].models;
var config = {{
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.All,
settings: {{
filterPaneEnabled: true,
navContentPaneEnabled: false,
}}
}};
var reportContainer = document.getElementById('reportContainer');
var report = powerbi.embed(reportContainer, config);
</script>
</body>
</html>