<?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 Printing PDF in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Printing-PDF/m-p/164996#M37475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have looked through the forum and I am close to a resolution on this but I cannot quite get the code right for what I want to do.&lt;/P&gt;&lt;P&gt;I want to be able to run a report for each possible selection in this case company name and name it as the company name.&lt;/P&gt;&lt;P&gt;What I am getting is one file not split by company, but when I run the test in the module I see the selection box flick through all the possible selections.&lt;/P&gt;&lt;P&gt;The code I am using is. The outcome I want is the report run once for each company possible value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub pdfprint&lt;BR /&gt; UrlPath = "c:\pdftest"&lt;BR /&gt; set val=ActiveDocument.Fields("Company_Name").GetPossibleValues&lt;BR /&gt; for f=0 to 0&lt;BR /&gt;&lt;BR /&gt; reportName01 = f&lt;BR /&gt; reportFile = UrlPath &amp;amp; val.Item(f).Text &amp;amp; ".pdf"&lt;BR /&gt; HOLA= PrintReportPDF( "RP01", reportFile)&lt;BR /&gt; ActiveDocument.GetApplication.Sleep 5000&lt;BR /&gt; next&lt;BR /&gt;End Sub&lt;BR /&gt;'___________________________________________________________________________________________________________________________________________'&lt;BR /&gt;Function PrintReportPDF(oReport, pdfOutputFile)&lt;BR /&gt; Set WSHShell = CreateObject("WScript.Shell")&lt;BR /&gt; WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"&lt;BR /&gt; WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"&lt;BR /&gt; ActiveDocument.PrintReport oReport, "QlikViewPDF", false&lt;BR /&gt; set WSHShell = nothing&lt;BR /&gt;End Function&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 08:28:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-18T08:28:08Z</dc:date>
    <item>
      <title>Printing PDF</title>
      <link>https://community.qlik.com/t5/QlikView/Printing-PDF/m-p/164996#M37475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have looked through the forum and I am close to a resolution on this but I cannot quite get the code right for what I want to do.&lt;/P&gt;&lt;P&gt;I want to be able to run a report for each possible selection in this case company name and name it as the company name.&lt;/P&gt;&lt;P&gt;What I am getting is one file not split by company, but when I run the test in the module I see the selection box flick through all the possible selections.&lt;/P&gt;&lt;P&gt;The code I am using is. The outcome I want is the report run once for each company possible value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub pdfprint&lt;BR /&gt; UrlPath = "c:\pdftest"&lt;BR /&gt; set val=ActiveDocument.Fields("Company_Name").GetPossibleValues&lt;BR /&gt; for f=0 to 0&lt;BR /&gt;&lt;BR /&gt; reportName01 = f&lt;BR /&gt; reportFile = UrlPath &amp;amp; val.Item(f).Text &amp;amp; ".pdf"&lt;BR /&gt; HOLA= PrintReportPDF( "RP01", reportFile)&lt;BR /&gt; ActiveDocument.GetApplication.Sleep 5000&lt;BR /&gt; next&lt;BR /&gt;End Sub&lt;BR /&gt;'___________________________________________________________________________________________________________________________________________'&lt;BR /&gt;Function PrintReportPDF(oReport, pdfOutputFile)&lt;BR /&gt; Set WSHShell = CreateObject("WScript.Shell")&lt;BR /&gt; WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"&lt;BR /&gt; WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"&lt;BR /&gt; ActiveDocument.PrintReport oReport, "QlikViewPDF", false&lt;BR /&gt; set WSHShell = nothing&lt;BR /&gt;End Function&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 08:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Printing-PDF/m-p/164996#M37475</guid>
      <dc:creator />
      <dc:date>2010-08-18T08:28:08Z</dc:date>
    </item>
  </channel>
</rss>

