<?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 Re: report.updateSettings for layoutType not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/4287728#M58303</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/81049"&gt;@esng&lt;/a&gt;&amp;nbsp;, Switching to a mobile layout via update settings function is currently not possible. It has been listed as an limitation in the microsoft documentation&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/update-settings" target="_self"&gt;Documentation Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaiRathinavel_0-1731868571180.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1200927i3ED7D406F3E044E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaiRathinavel_0-1731868571180.png" alt="JaiRathinavel_0-1731868571180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;</description>
    <pubDate>Sun, 17 Nov 2024 18:37:35 GMT</pubDate>
    <dc:creator>Jai-Rathinavel</dc:creator>
    <dc:date>2024-11-17T18:37:35Z</dc:date>
    <item>
      <title>report.updateSettings for layoutType not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/511843#M15789</link>
      <description>&lt;P&gt;I need help on this issue. I've spent hours to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing a app embedded report with Javascript library following the tutorials. Everything is working except updating the&amp;nbsp;layoutType setting using the report.updateSettings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I define the&amp;nbsp;layoutType in the orginal config settings of the ebedded report, it will work, but nothing I am doing will update it dynamically once the page is loaded. I can change any other settin, for example: {filterPaneEnabled: true}, and it will work but it won't update layoutType setting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;/**
 * Check if screen size is mobile. If so, change report to mobile view.
 */
function checkWidth() {
    var newSettings = null;
    var windowsize = $(window).width();

    if (windowsize &amp;lt; 768) {
        console.log("Mobile! window size is: " + windowsize);
            newSettings = {
                layoutType: models.LayoutType.MobilePortrait
        };
    } else {
        // Get models. models contains enums that can be used.
        console.log("Desktop! window size is: " + windowsize);
            newSettings = {
                layoutType: models.LayoutType.Master
            };
    }
    
    // Get a reference to the embedded report HTML element
    embedContainer = $('#reportContainer')[0];

    // Get a reference to the embedded report.
    report = powerbi.get(embedContainer);

        // Update the settings by passing in the new settings you have configured.
        report.updateSettings(newSettings)
            .then(function () {
                console.log("Changed Layout to:");
                console.log(newSettings);
            })
            .catch(function (errors) {
                console.log(errors);
            });



}&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 12:08:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/511843#M15789</guid>
      <dc:creator>esng</dc:creator>
      <dc:date>2018-09-10T12:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: report.updateSettings for layoutType not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/4286417#M58301</link>
      <description>&lt;P&gt;Any solution same problem &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 16:46:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/4286417#M58301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-15T16:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: report.updateSettings for layoutType not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/4287728#M58303</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/81049"&gt;@esng&lt;/a&gt;&amp;nbsp;, Switching to a mobile layout via update settings function is currently not possible. It has been listed as an limitation in the microsoft documentation&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/update-settings" target="_self"&gt;Documentation Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaiRathinavel_0-1731868571180.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1200927i3ED7D406F3E044E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaiRathinavel_0-1731868571180.png" alt="JaiRathinavel_0-1731868571180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2024 18:37:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/report-updateSettings-for-layoutType-not-working/m-p/4287728#M58303</guid>
      <dc:creator>Jai-Rathinavel</dc:creator>
      <dc:date>2024-11-17T18:37:35Z</dc:date>
    </item>
  </channel>
</rss>

