currently i am embedding 1 powerbi report in the sample app . How to embedd multiple reports from the workspace. Following is the sample code of my html file with report container:
<h2>Embedded Report</h2>
<div id="embedContainer"></div>
<script>
// Get a reference to the embedded report HTML element
const reportContainer = $('#embedContainer')[0];
powerbi.bootstrap(reportContainer, { type: 'report' });
const accessToken = "@Model.EmbedToken.Token";
const embedUrl = "@Html.Raw(Model.EmbedReports[0].EmbedUrl)";
const embedReportId = "@Model.EmbedReports[0].ReportId";
const tokenExpiry = "@Model.EmbedToken.Expiration";
const models = window['powerbi-client'].models;
const config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.All,
settings: {
// background: models.BackgroundType.Transparent,
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
// Embed the report and display it within the div container.
const report = powerbi.embed(reportContainer, config);
</script>