Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
GustavoSouza
Frequent Visitor

Report Size

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:

 

Spoiler

@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>

01.png

 

1 REPLY 1
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @GustavoSouza 

 

check this out.

https://www.w3schools.com/howto/howto_css_div_full_height.asp

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

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


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.