<?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 Change QVW store path in script execution in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473608#M1147205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm trying to create the template report and dinamicly store it where i need it to be stored. Problem is that i don't know how. For example i'm runing template script from .bat file and inputing argument from command line that it is a report No.5. Script should check the report number and if it is report number five store it in different folder with specific name. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could anyone assist me on this matter? And thank you in advance for your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jul 2013 06:32:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-12T06:32:13Z</dc:date>
    <item>
      <title>Change QVW store path in script execution</title>
      <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473608#M1147205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm trying to create the template report and dinamicly store it where i need it to be stored. Problem is that i don't know how. For example i'm runing template script from .bat file and inputing argument from command line that it is a report No.5. Script should check the report number and if it is report number five store it in different folder with specific name. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could anyone assist me on this matter? And thank you in advance for your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 06:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473608#M1147205</guid>
      <dc:creator />
      <dc:date>2013-07-12T06:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change QVW store path in script execution</title>
      <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473609#M1147206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does your request consist only in changing the store command path based on the parameter from the batch file ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the case, then the below example will help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;/P&gt;&lt;P&gt;LOAD ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;,0) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;set&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;qvdpath&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #ff8000; font-size: 10pt;"&gt;'folderA\'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;ELSE&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;set&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;qvdpath&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #ff8000; font-size: 10pt;"&gt;'folderB\'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;ENDIF&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;STORE&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;EM&gt;table1&lt;/EM&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(qvdpath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;table1.qvd; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The batch command would be for example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;"C:\Program Files\QlikView\QV.exe" /r /vi=0 "C:\Users\Test\Desktop\QVWFile.qvw"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that the variable exists in your app and not to have any let/set statement in your script that can override the value passed from the batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 08:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473609#M1147206</guid>
      <dc:creator />
      <dc:date>2013-07-12T08:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change QVW store path in script execution</title>
      <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473610#M1147207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is for storing qvd files (data/table files) what i need is to store whole report (qvw) file in a specific folder. But thank you for your answer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 10:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473610#M1147207</guid>
      <dc:creator />
      <dc:date>2013-07-12T10:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change QVW store path in script execution</title>
      <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473611#M1147208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&lt;/P&gt;&lt;P&gt;So maybe the below scenario using a macro will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use the same batch command line as the one in my previous post.&lt;/P&gt;&lt;P&gt;The QVWFile.qvw will contain the variable "i" and the below macro (ctrl+m):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sub savedoc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;vMacro = ActiveDocument.Variables("i").GetContent.String&lt;BR /&gt;if vMacro = 0 then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vdoc = "C:\Users\Test\Desktop\File1.qvw"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vfolder = "C:\Users\Test\Desktop\folderA\"&lt;/P&gt;&lt;P&gt;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vdoc = "C:\Users\Test\Desktop\File2.qvw"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vfolder = "C:\Users\Test\Desktop\folderB\"&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;set pathdoc = ActiveDocument.GetApplication.OpenDoc(vdoc,"","")&lt;BR /&gt;namedoc = Mid(pathdoc, InStrRev(pathdoc,"\") + 1)&lt;BR /&gt;pathdoc.SaveAs(vfolder &amp;amp; "\" &amp;amp;&amp;nbsp; namedoc)&lt;BR /&gt;pathdoc.CloseDoc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;end sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add in QVWFile a document trigger OnPostReload to RunMacro savedoc (Settings &amp;gt; Document Properties &amp;gt; Triggers &amp;gt; Document Event Triggers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when the batch file is executed, based on the argument value, it will either save File1 in FolderA or File2 in FolderB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that this answers your initial request &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 14:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473611#M1147208</guid>
      <dc:creator />
      <dc:date>2013-07-12T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change QVW store path in script execution</title>
      <link>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473612#M1147209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might actualy work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 09:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-QVW-store-path-in-script-execution/m-p/473612#M1147209</guid>
      <dc:creator />
      <dc:date>2013-07-15T09:28:11Z</dc:date>
    </item>
  </channel>
</rss>

