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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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