<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic powerbi-client-react - How to enter full screen mode? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4292452#M58351</link>
    <description>&lt;P&gt;Although I found a full-screen solution, I am not very satisfied with it.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Possible-to-display-embedded-reports-in-full-screen-mode/m-p/338701#M10014" target="_self"&gt;display embedded reports in full screen mode&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this should be possible by setting embedConfig, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const embedConfig = {
    type: 'report',
    embedUrl,
    accessToken,
    tokenType: models.TokenType.Embed,
    settings: {
        fullscreenButton: {
            visible: true,
        }
    },
  };&lt;/LI-CODE&gt;&lt;P&gt;but I haven't found any documentation on this.&lt;/P&gt;&lt;P&gt;Does anyone know how to do this? Thanks a lot.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2024 05:52:45 GMT</pubDate>
    <dc:creator>JinHe</dc:creator>
    <dc:date>2024-11-20T05:52:45Z</dc:date>
    <item>
      <title>powerbi-client-react - How to enter full screen mode?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4292452#M58351</link>
      <description>&lt;P&gt;Although I found a full-screen solution, I am not very satisfied with it.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Possible-to-display-embedded-reports-in-full-screen-mode/m-p/338701#M10014" target="_self"&gt;display embedded reports in full screen mode&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this should be possible by setting embedConfig, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const embedConfig = {
    type: 'report',
    embedUrl,
    accessToken,
    tokenType: models.TokenType.Embed,
    settings: {
        fullscreenButton: {
            visible: true,
        }
    },
  };&lt;/LI-CODE&gt;&lt;P&gt;but I haven't found any documentation on this.&lt;/P&gt;&lt;P&gt;Does anyone know how to do this? Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 05:52:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4292452#M58351</guid>
      <dc:creator>JinHe</dc:creator>
      <dc:date>2024-11-20T05:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: powerbi-client-react - How to enter full screen mode?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4294535#M58366</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/836802"&gt;@JinHe&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try the following codes and check if it can work:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;   var models = window['powerbi-client'].models;
        var embedConfig = {
            type: 'report',
            tokenType: models.TokenType.Embed,
            accessToken: 'YourAccessToken', // Replace with your access token
            embedUrl: 'YourEmbedUrl', // Replace with your embed URL
            id: 'YourReportId', // Replace with your report ID
            settings: {
                filterPaneEnabled: false,
                navContentPaneEnabled: false
            }
        };

        // Get a reference to the Power BI report container div
        var reportContainer = document.getElementById('reportContainer');

        // Embed the report and display it within the div container
        var report = powerbi.embed(reportContainer, embedConfig);

        report.on('loaded', function() {
            // Enter full screen mode once the report is loaded
            report.fullscreen();
        });&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 05:28:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4294535#M58366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T05:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: powerbi-client-react - How to enter full screen mode?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4294814#M58369</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;HI&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have implemented full screen functionality through a custom button. I just think this is not very convenient, this should be a built-in function of the report.&lt;/P&gt;&lt;P&gt;The following is the react code implementation, which realizes full screen by clicking the custom button：&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const reportRef = useRef();

function fullscreen() {
    if (reportRef &amp;amp;&amp;amp; reportRef.current) {
      reportRef.current.fullscreen();
    }
  }

&amp;lt;PowerBIEmbed
        embedConfig={reportConfig}
        eventHandlers={eventHandlersMap}
        cssClassName="report-container"
        getEmbeddedComponent={(embedObject) =&amp;gt; {
          reportRef.current = embedObject;
        }}
      /&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 07:44:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerbi-client-react-How-to-enter-full-screen-mode/m-p/4294814#M58369</guid>
      <dc:creator>JinHe</dc:creator>
      <dc:date>2024-11-21T07:44:48Z</dc:date>
    </item>
  </channel>
</rss>

