<?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 Server - Batch change of data source in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2437532#M23593</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="276505" data-lia-user-login="NHCC_IRE" class="lia-mention lia-mention-user"&gt;NHCC_IRE&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bsed on my knowledge, it is not supported to change the data source directly without open the .pbix file. Please try to create query parameter like what&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="109790" data-lia-user-login="d_gosbell" class="lia-mention lia-mention-user"&gt;d_gosbell&lt;/a&gt;&amp;nbsp;mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, maybe you can also try to&amp;nbsp;&lt;SPAN&gt;store your connection string to a config file, then write a custom function to analysis this file. After these steps, you can change the datasource without open the pbix file.(After you modified the config file, you should refresh it at pbix report to get the newest data).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;PRE&gt;let
xmlTable = Xml.Tables(File.Contents("C:\Users\xxxxx\Desktop\test.xml")),
server=xmlTable[Server]{0},
database=xmlTable[Database]{0},
Source= Sql.Database(server,database)
in
Source&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xml:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config&amp;gt;
&amp;lt;Server&amp;gt;"abc"&amp;lt;/Server&amp;gt;
&amp;lt;Database&amp;gt;"edd"&amp;lt;/Database&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Screenshots:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Change-pbix-data-source-programmatically/m-p/129735#M55227" target="_blank" rel="noopener"&gt;Solved: Re: Change pbix data source programmatically - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;
&lt;P&gt;Icey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2022 08:09:30 GMT</pubDate>
    <dc:creator>Icey</dc:creator>
    <dc:date>2022-04-05T08:09:30Z</dc:date>
    <item>
      <title>Report Server - Batch change of data source</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2429420#M23550</link>
      <description>&lt;P&gt;We have two machines that run Report Server on them: one for production and one for development where the development server is a clone of the production server plus any development we are doing. Both machines also have SQL servers running on them with identical sets of data. Currently, all reports point to the production SQL server for data. However, as the number of reports has grown, we are starting to see report refresh slowdowns and reports getting stuck because the reports on both machines are refreshing at the same time using the same machine. We have manually shifted the refresh times on the development server to later to avoid this. However, a more satisfying solution would be that all the reports on the development server using the SQL server on the development server and not the production server. Does anyone know of any easy (e.g. SQL, Power Query, etc.)&amp;nbsp; way of changing the data source of many reports as a batch process to accomplish this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - - - Andrew&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 12:15:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2429420#M23550</guid>
      <dc:creator>NHCC_IRE</dc:creator>
      <dc:date>2022-03-31T12:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server - Batch change of data source</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2430425#M23553</link>
      <description>&lt;P&gt;You could try this technique using Parameters in your Power Query code then changing them with a PowerShell script&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/report-server/connect-data-source-apis" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/report-server/connect-data-source-apis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 21:28:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2430425#M23553</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2022-03-31T21:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server - Batch change of data source</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2437532#M23593</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="276505" data-lia-user-login="NHCC_IRE" class="lia-mention lia-mention-user"&gt;NHCC_IRE&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bsed on my knowledge, it is not supported to change the data source directly without open the .pbix file. Please try to create query parameter like what&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="109790" data-lia-user-login="d_gosbell" class="lia-mention lia-mention-user"&gt;d_gosbell&lt;/a&gt;&amp;nbsp;mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, maybe you can also try to&amp;nbsp;&lt;SPAN&gt;store your connection string to a config file, then write a custom function to analysis this file. After these steps, you can change the datasource without open the pbix file.(After you modified the config file, you should refresh it at pbix report to get the newest data).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;PRE&gt;let
xmlTable = Xml.Tables(File.Contents("C:\Users\xxxxx\Desktop\test.xml")),
server=xmlTable[Server]{0},
database=xmlTable[Database]{0},
Source= Sql.Database(server,database)
in
Source&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xml:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config&amp;gt;
&amp;lt;Server&amp;gt;"abc"&amp;lt;/Server&amp;gt;
&amp;lt;Database&amp;gt;"edd"&amp;lt;/Database&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Screenshots:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Change-pbix-data-source-programmatically/m-p/129735#M55227" target="_blank" rel="noopener"&gt;Solved: Re: Change pbix data source programmatically - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;
&lt;P&gt;Icey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 08:09:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-Batch-change-of-data-source/m-p/2437532#M23593</guid>
      <dc:creator>Icey</dc:creator>
      <dc:date>2022-04-05T08:09:30Z</dc:date>
    </item>
  </channel>
</rss>

