<?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: ExportTo API: Locale setting not used in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2293063#M33978</link>
    <description>&lt;P&gt;Yes, upgrading to Gen2 fixed our locale problem. Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jan 2022 09:28:41 GMT</pubDate>
    <dc:creator>erikmourits</dc:creator>
    <dc:date>2022-01-20T09:28:41Z</dc:date>
    <item>
      <title>ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2288825#M33931</link>
      <description>&lt;P&gt;I'm using this API to export an embedded report to pdf and powerpoint: &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/export-to" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/export-to&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My users are based in the netherlands so I choose to hardcode 'nl-NL' as the locale for now. Unfortunately this setting does not result in a pdf with values in dutch culture settings (date and number formatting).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The (embedded) report is rendered correctly and switching my browsers culture also changes the formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried different locale strings: "nl", "nl-NL" and "nl-nl"&lt;/P&gt;&lt;P&gt;My code looks like this:&lt;/P&gt;&lt;PRE&gt;var effectiveIdentities = GetEffectiveIdentities(groupId, report.DatasetId);
            var powerBiReportExportConfiguration = new PowerBIReportExportConfiguration
            {
                Settings = new ExportReportSettings
                {
                    Locale = "nl-nl",
                    IncludeHiddenPages = false
                },
                Identities = effectiveIdentities,
                Pages = pages.OrderBy(x =&amp;gt; x.Order).Select(pn =&amp;gt; new ExportReportPage(pn.Name)
                {
                    Bookmark = new PageBookmark(state: filters)
                }).ToList()
            };

            var paginatedReportExportConfiguration = new PaginatedReportExportConfiguration(effectiveIdentities);
            return pbiClient.Reports.ExportToFileInGroup(groupId,
                reportId,
                new ExportReportRequest(fileFormat, powerBiReportExportConfiguration, paginatedReportExportConfiguration));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Or is this a bug in the API?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 12:32:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2288825#M33931</guid>
      <dc:creator>emourits</dc:creator>
      <dc:date>2022-01-18T12:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2289503#M33937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please don't create an export request with both powerbiReportExportConfiguration and paginatedReportExportConfiguration. you should specify only one of them based on the type of your report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I verified Locale is working as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amos&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 17:33:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2289503#M33937</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-01-18T17:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290592#M33948</link>
      <description>&lt;P&gt;It's still not working. I've removed everything non essential to simplify things:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; var effectiveIdentities = GetEffectiveIdentities(groupId, report.DatasetId);
            var powerBiReportExportConfiguration = new PowerBIReportExportConfiguration
            {
                Settings = new ExportReportSettings
                {
                    Locale = "nl-nl",
                    IncludeHiddenPages = false
                },
                Identities = effectiveIdentities,
            };

            return pbiClient.Reports.ExportToFileInGroup(groupId,
                reportId,
                new ExportReportRequest(fileFormat, powerBiReportExportConfiguration));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 09:06:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290592#M33948</guid>
      <dc:creator>emourits</dc:creator>
      <dc:date>2022-01-19T09:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290679#M33950</link>
      <description>&lt;P&gt;I don't see a reason it won't work for you, but it might help to see the request body as it was sent in the network (for example using fiddler traces).&lt;/P&gt;&lt;P&gt;Also if you can please share the request ID as returned from Power BI it might help us find the reason.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 09:39:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290679#M33950</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-01-19T09:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290751#M33952</link>
      <description>&lt;P&gt;The ID of the Export is:&amp;nbsp;&lt;SPAN&gt;MS9CbG9iSWRWMi1lODA3ZjEzZC1lZmEwLTQ3MzktYmJhYS05Mjg3MzE4MTFkOWNPU28zVEx4THB1RGF5eVd6NWFkM1JqSzJMWUtNVTVZY21WY3M0MFZUaWFjPS4=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try and get the Fiddler trace working and respond with that later.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 10:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290751#M33952</guid>
      <dc:creator>emourits</dc:creator>
      <dc:date>2022-01-19T10:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290792#M33953</link>
      <description>&lt;P&gt;The fiddler trace:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POST https://api.powerbi.com/v1.0/myorg/groups/9652bddc-b890-4256-a219-900fec61378c/reports/116623fd-2e69-4af1-9f9a-30b17b36feec/ExportTo HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer xxxxxx
User-Agent: FxVersion/6.0.121.56705 OSName/Windows OSVersion/Microsoft.Windows.10.0.19044 Microsoft.PowerBI.Api.PowerBIClient/4.1.01803.0001
Request-Context: appId=cid-v1:aa7a3e4e-095d-4072-8760-2b750dbd937a
Request-Id: |d6785cbd6c5d4a4e026eb4d584d56e8c.1772c6e038dc6cee.
traceparent: 00-d6785cbd6c5d4a4e026eb4d584d56e8c-1772c6e038dc6cee-00
Content-Type: application/json; charset=utf-8
Content-Length: 382

{
  "format": "PDF",
  "powerBIReportConfiguration": {
    "settings": {
      "locale": "nl-nl",
      "includeHiddenPages": false
    },
    "identities": [
      {
        "username": "xxxx",
        "datasets": [
          "6b6c16c4-cef3-410c-b4e4-1d2c655e5466"
        ],
        "roles": [
          "Reader"
        ]
      }
    ]
  }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Jan 2022 10:19:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2290792#M33953</guid>
      <dc:creator>emourits</dc:creator>
      <dc:date>2022-01-19T10:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2291055#M33956</link>
      <description>&lt;P&gt;We suspect that there's an issue with locale in "Export to File" REST API when your report resides on a Gen1 capacity.&lt;/P&gt;&lt;P&gt;We recommend upgrading the capacity to Gen2 where this feature works as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 12:26:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2291055#M33956</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-01-19T12:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTo API: Locale setting not used</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2293063#M33978</link>
      <description>&lt;P&gt;Yes, upgrading to Gen2 fixed our locale problem. Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 09:28:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportTo-API-Locale-setting-not-used/m-p/2293063#M33978</guid>
      <dc:creator>erikmourits</dc:creator>
      <dc:date>2022-01-20T09:28:41Z</dc:date>
    </item>
  </channel>
</rss>

