<?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 PostReload trigger not working in Command line execution in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/PostReload-trigger-not-working-in-Command-line-execution/m-p/237865#M88849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some code that spits out a pdf report to a file location. (shown at the bottom of this thread)&lt;/P&gt;&lt;P&gt;The macro is triggered on a post re-load. It works fine when I load the document manually but does not spit out the pdf document when i do a commmand line execution (shown below)&lt;/P&gt;&lt;P&gt;I've tried this on version 9 release 2 and version 9 release 4.&lt;/P&gt;&lt;P&gt;Any ideas on getting this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;"D:\Program Files\QlikView\QV.exe" /r D:\SIPMobile\CallCenterMblDroid.qvw&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;code to spit out the pdf shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;sub PrintReport&lt;BR /&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;BR /&gt;fln = "&lt;A&gt;\\Fcqvprod01\inphonicdashboards$\MblCopy\QVOAMBL.pdf&lt;/A&gt;"&lt;BR /&gt;RegKey = "HKEY_CURRENT_USER\Software\QlikViewPDF"&lt;BR /&gt;WSHShell.RegWrite RegKey &amp;amp; "BypassSaveAs", 1&lt;BR /&gt;WSHShell.RegWrite RegKey &amp;amp; "OutputFile", fln&lt;BR /&gt;ActiveDocument.GetApplication.Sleep 2000&lt;BR /&gt;ActiveDocument.PrintDocReport "RP01", "QlikViewPDF"&lt;BR /&gt;Set WSHShell = nothing&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jul 2010 16:04:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-29T16:04:15Z</dc:date>
    <item>
      <title>PostReload trigger not working in Command line execution</title>
      <link>https://community.qlik.com/t5/QlikView/PostReload-trigger-not-working-in-Command-line-execution/m-p/237865#M88849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some code that spits out a pdf report to a file location. (shown at the bottom of this thread)&lt;/P&gt;&lt;P&gt;The macro is triggered on a post re-load. It works fine when I load the document manually but does not spit out the pdf document when i do a commmand line execution (shown below)&lt;/P&gt;&lt;P&gt;I've tried this on version 9 release 2 and version 9 release 4.&lt;/P&gt;&lt;P&gt;Any ideas on getting this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;"D:\Program Files\QlikView\QV.exe" /r D:\SIPMobile\CallCenterMblDroid.qvw&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;code to spit out the pdf shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;sub PrintReport&lt;BR /&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;BR /&gt;fln = "&lt;A&gt;\\Fcqvprod01\inphonicdashboards$\MblCopy\QVOAMBL.pdf&lt;/A&gt;"&lt;BR /&gt;RegKey = "HKEY_CURRENT_USER\Software\QlikViewPDF"&lt;BR /&gt;WSHShell.RegWrite RegKey &amp;amp; "BypassSaveAs", 1&lt;BR /&gt;WSHShell.RegWrite RegKey &amp;amp; "OutputFile", fln&lt;BR /&gt;ActiveDocument.GetApplication.Sleep 2000&lt;BR /&gt;ActiveDocument.PrintDocReport "RP01", "QlikViewPDF"&lt;BR /&gt;Set WSHShell = nothing&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 16:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PostReload-trigger-not-working-in-Command-line-execution/m-p/237865#M88849</guid>
      <dc:creator />
      <dc:date>2010-07-29T16:04:15Z</dc:date>
    </item>
    <item>
      <title>PostReload trigger not working in Command line execution</title>
      <link>https://community.qlik.com/t5/QlikView/PostReload-trigger-not-working-in-Command-line-execution/m-p/237866#M88850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;I had a similar problem a couple of years ago (in QV 7) and I created a workaround by replacing the /r with /l in the command string and adding the command "ActiveDocument.GetApplication.Quit" to the end of the macro.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;/Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 14:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PostReload-trigger-not-working-in-Command-line-execution/m-p/237866#M88850</guid>
      <dc:creator />
      <dc:date>2010-07-30T14:04:55Z</dc:date>
    </item>
  </channel>
</rss>

