Forum Discussion
custom visual, Iframe content not showing
Hi.
I have a custom visual with an IFrame that displays a Asp mvc web page.
When I create a report in PowerBI.com, add the custom visual and sett the URL property.
This reports shows my asp mvc web page within the IFrame. Meaning both the visual iframe and the iframe within the visual.
When I create the same report in the PowerBI desktop application. Import my custom visual, set the data source and url. Publish my report to PowerBI.com. This report does not show my iframe within the visual.
The div id="sandbox-host" within the visual iframe is there. But this div have no content.
Generated by PowerBI desktop, empty div
<div id="sandbox-host" class="visual visual-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237"></div>
Generated by PowerBI.com
<div id="sandbox-host" class="visual visual-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237">
<iframe src="https://XXXXXXXXXXXXXXXXXXXXXXXXXXX707057500079987300" style="width: 260px; height: 244px;">
</iframe>
</div>
What I can se is that my property within my visual is listed in the javascript for my custom visual
<script id="js-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237" name="aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237">
...
I don't get any javascript errors when viewing my report.
So how can I get a report generated by PowerBi desktop to view the content of my IFrame?
Regards
/Frode
It seems Power BI Desktop blocks an iframe inside another ifframe due to using sandboxed iframe.
To bypass this issue we would recommend not to use an additional iframe.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
5 Replies
- v-viigCommunity Champion
It seems Power BI Desktop blocks an iframe inside another ifframe due to using sandboxed iframe.
To bypass this issue we would recommend not to use an additional iframe.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- AnonymousNot applicable
Is it possible to set the source of the outer iframe, the visual in it self?
- v-viigCommunity Champion
No, it is not possbile due to security concerns.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals