<?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 OnPostReload macro create PDF does not work in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190429#M52939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Steve,&lt;/P&gt;&lt;P&gt;You need first to get the value from the variable, (my guess is that vCreatePDF is not a macro variable but a QlikView variable):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub ReportCheck set var = ActiveDocument.Variables("vCreatePDF") val = var.GetContent.String if val = 1 then call CreateReports var.SetContent 0, true end ifEnd Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Sep 2010 11:40:16 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-09-07T11:40:16Z</dc:date>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190422#M52932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Hi All&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I have a macro to print pdf's with a trigger OnPostReload that works ok when the QlikView document is reloaded directly via the desktop but when my document is reloaded via the server it does not create the pdf?. Does anyone have any ideas or suggestions. Using 9 sr5, QlikViewPDF, have set Requested Module Security to System Access and Current Local Security to Allow System Access.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'Functions creates the reports in PDF format&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'***************************************************&lt;/P&gt;&lt;P&gt;&lt;B&gt;sub&lt;/B&gt; CreateReports&lt;/P&gt;&lt;P&gt;"D:\DataPDF"&lt;/P&gt;&lt;P&gt;"RP01"&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; rep = ActiveDocument.GetReport(reportID)&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; vShow = ActiveDocument.Variables("vShow")&lt;/P&gt;&lt;P&gt;"on", &lt;B&gt;true&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'Create the file name with path&lt;/P&gt;&lt;P&gt;"" &amp;amp; reportID &amp;amp; "_" &amp;amp; reportName &amp;amp; ".pdf"&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'print the report&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'Call the function&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'Rename the report&lt;/P&gt;&lt;P&gt;&lt;B&gt;'checkOutputFile reportFile, tempFolder&lt;/B&gt; 'Call the function&lt;/P&gt;&lt;P&gt;&lt;B&gt;'call ClearDefault()&lt;/B&gt; 'Call the function&lt;/P&gt;&lt;P&gt;&lt;B&gt;end&lt;/B&gt; &lt;B&gt;sub&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'Actual function to print the PDF format without being asked for location to save&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'***************************************************&lt;/P&gt;&lt;P&gt;&lt;B&gt;function&lt;/B&gt; printReportPDF(oReport, pdfLocation)&lt;/P&gt;&lt;P&gt;&lt;B&gt;Set&lt;/B&gt; WSHShell = &lt;B&gt;CreateObject&lt;/B&gt;("WScript.Shell")&lt;/P&gt;&lt;P&gt;"HKCU\Software\CUSTPDF Writer\DefaultLocation", pdfLocation, "REG_SZ"&lt;/P&gt;&lt;P&gt;"HKCU\Software\CUSTPDF Writer\UseJobName", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;"HKCU\Software\CUSTPDF Writer\UseDefaultLocation", "1", "REG_SZ"&lt;/P&gt;&lt;P style="font-weight: bold"&gt;'QV Print&lt;/P&gt;&lt;P&gt;"QlikViewPDF",&lt;B&gt;false&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; WSHShell = &lt;B&gt;nothing&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;end&lt;/B&gt; &lt;B&gt;function&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;B&gt;Steve.&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190422#M52932</guid>
      <dc:creator />
      <dc:date>2010-09-06T12:47:10Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190423#M52933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Steve,&lt;/P&gt;&lt;P&gt;First, have you checked you are allowing macro execution on server in QlikView Management Console / User Documents?&lt;/P&gt;&lt;P&gt;Second, Do you have the report available when you open the document in server?&lt;/P&gt;&lt;P&gt;And last, do you have a "CUSTPDF Writer" printer in your server?&lt;/P&gt;&lt;P&gt;They may be obvious, but they are the main things that may differ from your computer to the server.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190423#M52933</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-09-06T12:53:19Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190424#M52934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the QlikView document (Reload) I am actually running it on the server, and it generate the PDF from the OnPostReload trigger, it is only when I use the QlikView Management Console to reload it that it does not trigger the OnPostReload trigger to create the PDF. Please see below in answer to the info you sent.&lt;/P&gt;&lt;P&gt;First, have you checked you are allowing macro execution on server in QlikView Management Console / User Documents? - In QlikView Management Console / QlikView Server Settings / Security - the option Allow Macro Execution on Server - is enabled&lt;/P&gt;&lt;P&gt;Second, Do you have the report available when you open the document in server? Yes the report is available to use and the auto pdf of the report does work. (FYI I develop on the server itself)&lt;/P&gt;&lt;P&gt;And last, do you have a "CUSTPDF Writer" printer in your server? I use PDF-Xchange 3.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 13:13:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190424#M52934</guid>
      <dc:creator />
      <dc:date>2010-09-06T13:13:38Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190425#M52935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macros cant be run like that, see:&lt;/P&gt;&lt;P&gt;http://community.qlik.com/forums/t/26240.aspx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 14:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190425#M52935</guid>
      <dc:creator />
      <dc:date>2010-09-06T14:37:18Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190426#M52936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danjo&lt;/P&gt;&lt;P&gt;Thanks for your input. Setup a batch with&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;D:\QVApps\Dev\Sales&amp;gt;"C:\Program Files\QlikView\Qv.exe" /R "D:\QVApps\Dev\SalesEMEAV3.08.qvw"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It opens a window - executes the file (I see the Script execution Progress window come up and run through the qvw file) - but still does not run the OnPostReload trigger to run the macro CreateReports&lt;/P&gt;&lt;P&gt;It also does not close the window when it is finished?&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Regards Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 15:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190426#M52936</guid>
      <dc:creator />
      <dc:date>2010-09-06T15:32:54Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190427#M52937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to run it twice using the Publisher since the trigger for OnPost Reload does not work when uploads are being done using the Publisher. OnOpen triggers do work in the Publisher.&lt;/P&gt;&lt;P&gt;Each time that you run the upload, you need to pass a parameter that will be use by the OnOpen trigger macro. The first upload's parm will be used in the macro to bypass the PDF cycle and just do the upload of the QV. The second time the QV is is opened for upload, the parm will indicate to the macro to go ahead and run the PDG generation. At the end of the macro, it should save the QV and quit the QV.&lt;/P&gt;&lt;P&gt;1st upload: (content of vPDF = NO)&lt;/P&gt;&lt;P&gt;n:\\\qv.exe /r /vPDF n:\dircrectory\document.qvw&lt;/P&gt;&lt;P&gt;2nd upload (content of vPDF = YES)&lt;/P&gt;&lt;P&gt;n:\\\qv.exe /l vPDF n:\dircrectory\document.qvw&lt;/P&gt;&lt;P&gt;You will probably need to put the above statements in a cmd file to be executed by "External Programs" in the Publisher.&lt;/P&gt;&lt;P&gt;and the statement in the "External Programs" should be something like this:&lt;/P&gt;&lt;P&gt;C:\WINDOWS\system32\CMD.exe /c n:\Qlik\Execution_Batch_Files\Generate PDF.cmd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 15:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190427#M52937</guid>
      <dc:creator />
      <dc:date>2010-09-06T15:33:31Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190428#M52938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fredrick&lt;/P&gt;&lt;P&gt;Many thanks, I have been trying to create the macro, but I can not seem to get it to work. Any idea as to why? It will not run the CreateReports or set the vPDF to 0.&lt;/P&gt;&lt;P&gt;sub ReportCheck&lt;BR /&gt; if vCreatePDF = 1 then&lt;BR /&gt; CreateReports&lt;BR /&gt; set vPDF = ActiveDocument.Variables("vCreatePDF")&lt;BR /&gt; vPDF.SetContent "0",true&lt;BR /&gt; end if&lt;BR /&gt;End sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 11:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190428#M52938</guid>
      <dc:creator />
      <dc:date>2010-09-07T11:25:28Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190429#M52939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Steve,&lt;/P&gt;&lt;P&gt;You need first to get the value from the variable, (my guess is that vCreatePDF is not a macro variable but a QlikView variable):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub ReportCheck set var = ActiveDocument.Variables("vCreatePDF") val = var.GetContent.String if val = 1 then call CreateReports var.SetContent 0, true end ifEnd Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 11:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190429#M52939</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-09-07T11:40:16Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190430#M52940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Hi Miguel&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Thank you very much. I had spent hours trying different things. What you gave me was exactly what I needed. If QlikView don't already pay you a salary they should J&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;You are very knowledgeable and very helpful. Many thanks&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;For anyone else out there this is how I got around macro's not working through publisher - through OnPostReload&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;My full task was to create PDF's on a daily basis with a sales summary.&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I created a hidden sheet with a qv variable vshow so that the sheets would not be visible by the users, and I could create custom objects for the report&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I created a report in my QlikView document using the objects from the hidden sheet&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I created the following macro in the qv document&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'Functions checks if the report should be run&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;sub ReportCheck&lt;/I&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; set var = ActiveDocument.Variables("vCreatePDF")&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; val = var.GetContent.String&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; if val = 1 then&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; call CreateReports&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; var.SetContent 0, true&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt; end if&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;End Sub&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'Functions creates the reports in PDF format&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;sub CreateReports&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;tempFolder = "D:\DataPDF"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;reportID = "RP01"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;set rep = ActiveDocument.GetReport(reportID)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'set vShow = ActiveDocument.Variables("vShow")&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'vShow.SetContent "on", true&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;reportName = rep.Name&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'Create the file name with path&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;reportFile = tempFolder &amp;amp; "\" &amp;amp; reportID &amp;amp; "_" &amp;amp; reportName &amp;amp; ".pdf"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'print the report&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;printReportPDF reportID, tempFolder 'Call the function&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'Rename the report&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'checkOutputFile reportFile, tempFolder 'Call the function&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;'call ClearDefault()&lt;/I&gt; 'Call the function&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;end sub&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'Actual function to print the PDF format without being asked for location to save&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;'***************************************************&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;function printReportPDF(oReport, pdfLocation)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\DefaultLocation", pdfLocation, "REG_SZ"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseJobName", "1", "REG_SZ"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseDefaultLocation", "1", "REG_SZ"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;'QV Print&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;ActiveDocument.PrintReport oReport, "PDFCreator",false&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;set WSHShell = nothing&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-bidi-font-style: normal"&gt;end function&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I created a trigger OnOpen to run macro "ReportCheck"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I created the a second qv document to distribute or create my pdf through a schedule&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;execute&lt;/B&gt; "C:\Program Files\QlikView\Qv.exe" /R /vvCreatePDF=1 /NoSecurity "D:\QVApps\Dev\Sales\EMEA V3.08.qvw"&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I run my main qv on a daily schedule through publisher then i run the second qv loading on completion of the first to generate the PDF's&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;I then use a program blat and windows schedule to attach my PDF's to emails and send to recipients.&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Hope this helps other people out to... Thanks to everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190430#M52940</guid>
      <dc:creator />
      <dc:date>2010-09-07T13:13:58Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190431#M52941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be a dumb question, but if I'm running the /R command from the command line, do I need QlikView Desktop installed on my server? I have Publisher installed on the server, I dont think there's a QV Desktop on it at the moment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 15:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190431#M52941</guid>
      <dc:creator />
      <dc:date>2010-09-30T15:17:49Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190432#M52942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on where you are trying to load the QV.exe program from. If it is your C: drive on your PC, then yes. Otherwise the location that you are loading the QV.exe from must have it installed there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 19:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190432#M52942</guid>
      <dc:creator />
      <dc:date>2010-10-05T19:02:39Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190433#M52943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm having doubts. When I run this macro createreports pdfcretor opening prompt. How can I not open this window?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 13:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190433#M52943</guid>
      <dc:creator />
      <dc:date>2011-01-21T13:53:09Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190434#M52944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;Have you got the solution .. Please let me know ....&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chakravarthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 14:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190434#M52944</guid>
      <dc:creator />
      <dc:date>2011-01-21T14:45:06Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190435#M52945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="g-section g-unit" id="gt-form-c"&gt;&lt;DIV class="almost_half_cell" id="gt-res-content"&gt;&lt;DIV dir="ltr"&gt;redid the app and it is not opening the window more createpdf, but not the fileis being saved in the directory, anyone know what might be?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;thanks...&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="g-section" id="gt-res-tools"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV id="gt-ft"&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 14:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190435#M52945</guid>
      <dc:creator />
      <dc:date>2011-01-21T14:48:45Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190436#M52946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robson/Chakravarthy - It would be a lot easier if you could upload your doc. You could limit your data so as not to give away any real information...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 15:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190436#M52946</guid>
      <dc:creator />
      <dc:date>2011-01-21T15:00:06Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190437#M52947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;Sorry, I need this in pdf and automatically generate...&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 16:48:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190437#M52947</guid>
      <dc:creator />
      <dc:date>2011-01-21T16:48:31Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190438#M52948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I´m testing this command line but I have a problem, the aplicattion reload perfect, but when it has to generate the pdf the status is SPOOLING so it doesn´t generate it.&lt;/P&gt;&lt;P&gt;My command line is this: execute "C:\Program Files\QlikView\QV.exe" /R /vvCreatePDF=1 /NoSecurity E:\Produccion\QlikViewStorage\Admisiones\Aplicaciones\Admisiones_Reporte.qvw&lt;/P&gt;&lt;P&gt;if I reload inside the application it generates the pdf perfectly, i don't know why is failing.&lt;/P&gt;&lt;P&gt;Any ideas???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 15:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190438#M52948</guid>
      <dc:creator />
      <dc:date>2011-02-01T15:22:57Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190439#M52949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matytr21&lt;/P&gt;&lt;P&gt;I may be wrong as it was a awhile ago, but when I did this I think I had a problem with reloading and creating the PDF in one command. What I can tell you is that I reload the document through management console and then when I run my script it is only to generate the PDF i.e. with the command to execute the variable (/vvCreatePDF=1) and it works... So my *.bat file has the following call "C:\Program Files\QlikView\Qv.exe" /NoSecurity /vvCreatePDF=1 "D:\QVApps\Prod\Sales\Group EMEA.qvw" so no /R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 17:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190439#M52949</guid>
      <dc:creator />
      <dc:date>2011-02-01T17:08:25Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190440#M52950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robson&lt;/P&gt;&lt;P&gt;I opened your test doc and when I clicked the "Test" button it did not work, but gave the Current Local Security - Allow System Access and then it worked fine. It will automatically print the PDF to my local printer. It printed the 2 possible values of 10 and 50. If your question it to now do this on a schedule you need to create a *.bat file (call "C:\Program Files\QlikView\Qv.exe" /NoSecurity /vvCreatePDF=1 "D:\QVApps\Prod\Sales\Group EMEA.qvw") replacing my route and file name with yours. The second thing is in Settings - Document Properties - Triggers - OnOpen, add a action - Run Macro "Report Check". Then add this code to your module. Hope this helps and answers your question?&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;sub ReportCheck&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;set var = ActiveDocument.Variables("vCreatePDF")&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;val = var.GetContent.String&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;if val = 1 then&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;var.SetContent 0, true&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;call CreateReports&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;ActiveDocument.GetApplication.Quit&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;end if&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1121.Capture.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1121.Capture.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 17:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190440#M52950</guid>
      <dc:creator />
      <dc:date>2011-02-01T17:24:22Z</dc:date>
    </item>
    <item>
      <title>OnPostReload macro create PDF does not work</title>
      <link>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190441#M52951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. My mistake was in setting PDFCreator I had not configuredto automatically print and did not know how to configure a trigger, but with yourhelp I managed to set the trigger.&lt;BR /&gt;&lt;BR /&gt;Thanks! &lt;IMG alt="Beer" src="http://community.qlik.com/emoticons/emotion-22.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 18:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnPostReload-macro-create-PDF-does-not-work/m-p/190441#M52951</guid>
      <dc:creator />
      <dc:date>2011-02-01T18:18:03Z</dc:date>
    </item>
  </channel>
</rss>

