Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi, i'm studying the App Owns Data example. I changed a little. Could you help me with EmbedReport View ? How would I get her to take the entire page size? For now the View looks like this:
@model Portal.Web.PowerBi.EmbedConfig
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="https://npmcdn.com/es6-promise@3.2.1"></script>
<script src="~/scripts/powerbi.js"></script>
@IF(!string.IsNullOrEmpty(Model.ErrorMessage))
{
<div id="errorWrapper">
<h2>
Error
</h2>
<pre>
@Model.ErrorMessage
</pre>
</div>
return;
}
<div id="embedContainer"></div>
<script>
var accessToken = "@Model.EmbedToken.Token";
var embedUrl = "@Html.Raw(Model.EmbedUrl)";
var embedReportId = "@Model.Id";
var models = window['powerbi-client'].models;
var config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedReportId,
permissions: models.Permissions.All,
//pageView: "actualSize",
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
var reportContainer = $('#embedContainer')[0];
if ("@Model.Username" != "") {
$("#RLS").prop('checked', true);
$("#RLSdiv").show();
}
else
{
$("#RLS").prop('checked', false);
$("#RLSdiv").hide();
}
if ("@Model.IsEffectiveIdentityRequired.GetValueOrDefault()" == "True") {
$("#noRLSdiv").hide();
$("#RLS").removeAttr("disabled");
$("#RLS").change(function () {
if ($(this).is(":checked")) {
$("#RLSdiv").show(300);
} else {
$("#RLSdiv").hide(200);
}
});
}
else
{
$("#noRLSdiv").show();
}
var report = powerbi.embed(reportContainer, config);
</script>
check this out.
https://www.w3schools.com/howto/howto_css_div_full_height.asp
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 131 | |
| 103 | |
| 58 | |
| 39 | |
| 31 |