cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tmcdevitt Advocate II
Advocate II

Setting the iframe background for embedded reports (default gray color is terrible)

We're embedding PowerBI reports in a custom application we're building. For the most part, this is working great. However, we can't figure out how to set the background color of the iframe in which reports are getting embedded. Note: we're not talking about the background color of the report. Instead, we're talking about the padding between the borders of the iframe and the report content. See attached image. From what we can tell, there's no way to set this from Desktop or from the embed calls we're making.

Ideally, we'd be able to reference an external CSS or something that would be used within the iframe of the report but that doesn't appear to be an option (and obviously, we can't control the styling of elements within the iframe from our application).

 

power_bi_embed_background.jpg

23 REPLIES 23
Power BI Team nimrod
Power BI Team

Re: Setting the iframe background for embedded reports (default gray color is terrible)

We are working on a solution for this now, so you will be able to use it pretty soon.

In general, we will enable you to optimize the size of the report page to fit into the iframe,

without any grey padding.

In addition, you will be able to get the report size, and so you will be able to optimize the DIV size and match it with the report size. 

tmcdevitt Advocate II
Advocate II

Re: Setting the iframe background for embedded reports (default gray color is terrible)

Ok, thanks for the info Nimrod.

 

One thing that might be really nice - allow us, in the embed call, to pass in a URL to a CSS resource that's external to PowerBI. Then, when the report renders in the iFrame, it includes that CSS. This way, we're in control of the CSS and can change up the report styling any way we choose.

jimmcslim Helper III
Helper III

Re: Setting the iframe background for embedded reports (default gray color is terrible)

Hi Nimrod,

 

Thanks for the update. The sooner this is available, plus the resizing support you mentioned, the better!

 

Just a question - where will the availability of this feature be communicated? Via this forum (which I don't monitor frequently) or via the Power BI blog (which I do monitor daily!).

Microsoft Eric_Zhang
Microsoft

Re: Setting the iframe background for embedded reports (default gray color is terrible)


@tmcdevitt wrote:

Ok, thanks for the info Nimrod.

 

One thing that might be really nice - allow us, in the embed call, to pass in a URL to a CSS resource that's external to PowerBI. Then, when the report renders in the iFrame, it includes that CSS. This way, we're in control of the CSS and can change up the report styling any way we choose.


@tmcdevitt

I guess you may have intrest in

Use Report Themes in Power BI Desktop

Power BI Themes Gallery

Power BI Team nimrod
Power BI Team

Re: Setting the iframe background for embedded reports (default gray color is terrible)

We are updating on all our new feature in our developers monthly blog posts.

Be sure to check there, that should get you covered.

tmcdevitt Advocate II
Advocate II

Re: Setting the iframe background for embedded reports (default gray color is terrible)

Hi Eric,

    We've looked at themes but they really don't get us what I'm talking about. First, they don't deal with the issue of the gray background. Second, and most important, you need to "install" them for each report and you have to do it via Desktop. So, if we've got a bunch of reports and need to roll out a theme change, guess what? We need to download each dataset, open them in Desktop, "import" the theme that changed and then publish the report. It's tedious, for sure.

    Since we're embedding reports, it would be way easier for us if we could just send you a URL to a CSS file (one that we control external to PowerBI) and then, within the embedded iframe, you guys just include the CSS file such that the styles within will be applied to the contents of the iframe.

    One other thing on themes - there doesn't appear to be a library of themes that Desktop is aware of. For example, let's say I pull down Theme A from the online theme gallery. I save that JSON file locally and then import it into a report in Desktop. Then, I want to experiment with another theme, Theme B. So, I download the JSON and import but I don't like it. So, I want to "switch" the theme in the report back to Theme A. Well, unfortunately, Desktop has no memory of Theme A. I need to go back to my local machine and import the JSON file that I had downloaded. That's fine for me but someone else who might be editing the report in another instance of Desktop won't have that JSON file on their local machine (and likely won't have any idea where to get it). Ideally, Desktop would remember all of the JSON themes that have been imported and allow you to easily switch between them without having to reupload the theme every time (Actually, now that I think about it, Desktop (and really, the online report editor) should be able to show the user the themes in the online gallery and let them install them directly from there as well).

 

- Terence

tmcdevitt Advocate II
Advocate II

Re: Setting the iframe background for embedded reports (default gray color is terrible)

Hey guys,

   Any update on this issue? Someone had mentioned this might be fixed "soon". Really hoping that's for the January release. We're trying to launch some of our embedded reports to actual users in early February and this gray background issue makes things look less professional than we'd like.

   Thanks.

 

- Terence

Power BI Team nimrod
Power BI Team

Re: Setting the iframe background for embedded reports (default gray color is terrible)

See January blog post- https://powerbi.microsoft.com/en-us/blog/power-bi-developer-community-january-update/

 

Look for 'Custom layout' feature.

Beaver
New Member

Re: Setting the iframe background for embedded reports (default gray color is terrible)

I am not seeing anything about changing bg color only the page size, or controlling visual sizes, position and visibility ;(......

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors