Forum Discussion
Possible to display embedded reports in full screen mode?
- 8 years ago
Don't know if you solved this or not, but it is possible to open embedded reports in fullscreen mode using javascript:
1. Add a button to the page:
<button id="myLink" onclick="fullscreen()">Fullscreen</button>
2. Add the javascript to get the report container id and open it in fullscreen mode:
<script type="text/javascript"> function fullscreen() { // Get a reference to the embedded report HTML element var embedContainer = $('#reportContainer')[0]; // Get a reference to the embedded report. report = powerbi.get(embedContainer); // Displays the report in full screen mode. report.fullscreen(); } </script>Hope this helps!
Don't know if you solved this or not, but it is possible to open embedded reports in fullscreen mode using javascript:
1. Add a button to the page:
<button id="myLink" onclick="fullscreen()">Fullscreen</button>
2. Add the javascript to get the report container id and open it in fullscreen mode:
<script type="text/javascript">
function fullscreen() {
// Get a reference to the embedded report HTML element
var embedContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(embedContainer);
// Displays the report in full screen mode.
report.fullscreen();
}
</script>Hope this helps!
Hi team,
I'm trying to use this code to generate a button fullscreen in my web, but I have some questions. What I need to put in id="myLink"? I can't find the link of power bi embedded.
<button id="myLink" onclick="fullscreen()">Fullscreen</button>
And in javascript, Do I need to change #reportContainer by the report id that I want to see on fullscreen?
var embedContainer = $('#reportContainer')[0];
Sorry for my questions, maybe are very amateurs but I need to understand this to make this button to see my embedded reports on fullscreen.