<?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: Macro not working when reloading from command line in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008901#M968601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Sreeni, first of all thanks for your help.&lt;/P&gt;&lt;P&gt;I don't believe it's a problem of services, I copied the qlikview file on another machine and the issue remains exactly the same. Furthermore on the same machine I have lot of other qvw files that work in the same manner called by a batch file. So I don't really understand where the problem could be. If I'll find out a solution I will post it,&lt;/P&gt;&lt;P&gt;any other idea is appreciated.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 11:08:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-23T11:08:35Z</dc:date>
    <item>
      <title>Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008897#M968597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;this is a very weird situation.&lt;/P&gt;&lt;P&gt;I have a simple script to export a csv file that is called&amp;nbsp; when OnPostReload event is fired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub ExportToCSV&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sObject1 = ActiveDocument.GetSheetObject("ClientiUnivoci")&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;sObject1.Export "Output\ClientiUnivoci_Week_" &amp;amp; Year(Now()) &amp;amp; LPad(Month(Now()),"0",2 ) &amp;amp; LPad(Day(Now()),"0",2 ) &amp;amp; ".csv", ";", 65001 &lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I launch reload inside qlikview the script works fine and the file is generated, when I lanch qlikview reload from a batch file using the following command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\Program Files\QlikView\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the qlikview file is reload but the macro is not executed and the csv file is not generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the following attemps without success:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"C:\Program Files\QlikView\Qv.exe" /r &lt;STRONG&gt;/NoSecurity &lt;/STRONG&gt;"C:\Qlikview\Project\LastWeek.qvw"&lt;/LI&gt;&lt;LI&gt;Settings | Document Properties | Security -&amp;gt; All checked except Allow Print, Show All Sheets and Objects and Show Progress for Hidden Script&lt;/LI&gt;&lt;LI&gt;Settings | User preferences | Security -&amp;gt; All checked except Confirm Launch from Macro&lt;/LI&gt;&lt;LI&gt;Tools | Edit Module | Request Module Security -&amp;gt; System Access&lt;/LI&gt;&lt;LI&gt;Tools | Edit Module | Current Local Security -&amp;gt; Allow System Access&lt;/LI&gt;&lt;LI&gt;Run batch as Administrator&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really know what to do more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008897#M968597</guid>
      <dc:creator />
      <dc:date>2015-09-23T09:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008898#M968598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess, you can execute through windows batch file. Btw, do you have QV server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Execute cmd.exe /C C:\BatFiles\Example.bat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sreeni&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:17:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008898#M968598</guid>
      <dc:creator>SreeniJD</dc:creator>
      <dc:date>2015-09-23T09:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008899#M968599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm already using a Windows bat file.&lt;/P&gt;&lt;P&gt;The bat file contains the following code:&lt;/P&gt;&lt;P&gt;"C:\Program Files\QlikView\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"&lt;/P&gt;&lt;P&gt;When I run the bat file qlikview reloads correctly but the macro is not executed.&lt;/P&gt;&lt;P&gt;I don't have QV server.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008899#M968599</guid>
      <dc:creator />
      <dc:date>2015-09-23T09:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008900#M968600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;Your windows bat file script is correct..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cd "C:\Program Files\Qlikview\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wondering, is there any service that is down causing the issue.. Can you please check the services in Control panel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008900#M968600</guid>
      <dc:creator>SreeniJD</dc:creator>
      <dc:date>2015-09-23T09:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008901#M968601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Sreeni, first of all thanks for your help.&lt;/P&gt;&lt;P&gt;I don't believe it's a problem of services, I copied the qlikview file on another machine and the issue remains exactly the same. Furthermore on the same machine I have lot of other qvw files that work in the same manner called by a batch file. So I don't really understand where the problem could be. If I'll find out a solution I will post it,&lt;/P&gt;&lt;P&gt;any other idea is appreciated.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 11:08:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008901#M968601</guid>
      <dc:creator />
      <dc:date>2015-09-23T11:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008902#M968602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make a try with /l as parameter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\Program Files\QlikView\Qv.exe" &lt;STRONG style="text-decoration: underline;"&gt;/l&lt;/STRONG&gt; "C:\Qlikview\Project\LastWeek.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 11:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008902#M968602</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-23T11:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008903#M968603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done. The QV file remains open but the macro in not executed.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 12:04:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008903#M968603</guid>
      <dc:creator />
      <dc:date>2015-09-23T12:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008904#M968604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this too: Settings | User preferences | Security -&amp;gt; All checked &lt;STRONG style="text-decoration: line-through;"&gt;except&lt;/STRONG&gt; Confirm Launch from Macro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 12:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008904#M968604</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-23T12:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008905#M968605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing to do. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks the same Marcus.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 12:50:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008905#M968605</guid>
      <dc:creator />
      <dc:date>2015-09-23T12:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008906#M968606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But in general this approach worked - I do the same since years. How do you execute the batch - as normal windows user which clicked on the batch within the explorer quite similar you open the qvw itself to start the reload or is this different from them?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 12:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008906#M968606</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-23T12:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008907#M968607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes exactly, I double click on the .bat file with the goal of inserting it in a scheduled task.&lt;/P&gt;&lt;P&gt;I use the same approach since years too, but I never faced a case like this. I'm working on it since yesterday evening but I still haven't found a solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008907#M968607</guid>
      <dc:creator />
      <dc:date>2015-09-23T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008908#M968608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds stupid now but try to change the trigger maybe to OnOpen, replace the routine with a simple msgbox or selection-action, create a complete new qvw with a small inline-table and a tablebox and use your export-routine again (something files get corrupted), further trial and error ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you those app created himself or it's from another person maybe even downloaded from a server or mailed to you - sometimes windows creates flags for this which could prevent an remote-execution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008908#M968608</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-23T13:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008909#M968615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Finally I resolved the issue&lt;/STRONG&gt;!!!!! Qlikview doesn't care about a relative path if the reload is executed inside the application. If the reload is executed externally from a command line you need to insert the full path in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRONG SCRIPT:&lt;/P&gt;&lt;P&gt;Sub ExportPercentileSettimana&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sObject2 = ActiveDocument.GetSheetObject("Percentile")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sObject2.ExportBiff "&lt;STRONG&gt;Output&lt;/STRONG&gt;\Percentile_Week_" &amp;amp; Year(Now()) &amp;amp; LPad(Month(Now()),"0",2 ) &amp;amp; LPad(Day(Now()),"0",2 ) &amp;amp; ".xls"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RIGHT SCRIPT:&lt;/P&gt;&lt;P&gt;Sub ExportPercentileSettimana&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sObject2 = ActiveDocument.GetSheetObject("Percentile")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sObject2.ExportBiff "&lt;STRONG&gt;C:\Users\sarnic\Documents\Progetti\Aperti\Project\Sviluppo\Report\&lt;/STRONG&gt;Output\Percentile_Week_" &amp;amp; Year(Now()) &amp;amp; LPad(Month(Now()),"0",2 ) &amp;amp; LPad(Day(Now()),"0",2 ) &amp;amp; ".xls"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this may help someone&amp;nbsp; else.&lt;/P&gt;&lt;P&gt;Thanks to everyone.&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008909#M968615</guid>
      <dc:creator />
      <dc:date>2015-09-23T13:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Macro not working when reloading from command line</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008910#M968616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mostly it are the small things ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-not-working-when-reloading-from-command-line/m-p/1008910#M968616</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-23T13:20:55Z</dc:date>
    </item>
  </channel>
</rss>

