<?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 Using a macro button to open an existing pdf. report ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221302#M74124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use this...&lt;/P&gt;&lt;P&gt;Hope this code help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ReportCheck&lt;/P&gt;&lt;P&gt;set var = ActiveDocument.Variables("vCreatePDF")&lt;/P&gt;&lt;P&gt;val = var.GetContent.String&lt;/P&gt;&lt;P&gt;if val = 1 then&lt;/P&gt;&lt;P&gt;call CreateReports&lt;/P&gt;&lt;P&gt;var.SetContent 0, true&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;'Functions creates the reports in PDF format&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;sub CreateReports&lt;/P&gt;&lt;P&gt;tempFolder = "D:\DataPDF"&lt;/P&gt;&lt;P&gt;reportID = "RP01"&lt;/P&gt;&lt;P&gt;set rep = ActiveDocument.GetReport(reportID)&lt;/P&gt;&lt;P&gt;'set vShow = ActiveDocument.Variables("vShow")&lt;/P&gt;&lt;P&gt;'vShow.SetContent "on", true&lt;/P&gt;&lt;P&gt;reportName = rep.Name&lt;/P&gt;&lt;P&gt;'Create the file name with path&lt;/P&gt;&lt;P&gt;reportFile = tempFolder &amp;amp; "\" &amp;amp; reportID &amp;amp; "_" &amp;amp; reportName &amp;amp; ".pdf"&lt;/P&gt;&lt;P&gt;'print the report&lt;/P&gt;&lt;P&gt;printReportPDF reportID, tempFolder 'Call the function&lt;/P&gt;&lt;P&gt;'Rename the report&lt;/P&gt;&lt;P&gt;'checkOutputFile reportFile, tempFolder 'Call the function&lt;/P&gt;&lt;P&gt;'call ClearDefault() 'Call the function&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;'Actual function to print the PDF format without being asked for location to save&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;function printReportPDF(oReport, pdfLocation)&lt;/P&gt;&lt;P&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\DefaultLocation", pdfLocation, "REG_SZ"&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseJobName", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseDefaultLocation", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;'QV Print&lt;/P&gt;&lt;P&gt;ActiveDocument.PrintReport oReport, "PDFCreator",false&lt;/P&gt;&lt;P&gt;set WSHShell = nothing&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and than create the&lt;/P&gt;&lt;P&gt;"I created a trigger OnOpen to run macro "ReportCheck"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Kamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 09:58:54 GMT</pubDate>
    <dc:creator>kamalqlik</dc:creator>
    <dc:date>2012-02-27T09:58:54Z</dc:date>
    <item>
      <title>Using a macro button to open an existing pdf. report ?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221299#M74121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I click on a button in a qlikview sheet , I want to open ana existing pdf report ? I think I should use macros , but don't have the macro codes for this operation !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2010 19:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221299#M74121</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2010-01-24T19:08:25Z</dc:date>
    </item>
    <item>
      <title>Using a macro button to open an existing pdf. file ?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221300#M74122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My idea is that some of the customers use qlikview via a browser! so they do not have the menu "reports" ! and need to use some reports that have been already created!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2010 19:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221300#M74122</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2010-01-24T19:15:26Z</dc:date>
    </item>
    <item>
      <title>Using a macro button to open an existing pdf. report ?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221301#M74123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Any reason why your not creating a text object, and then actions&amp;gt;add&amp;gt;external&amp;gt;launch?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 09:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221301#M74123</guid>
      <dc:creator />
      <dc:date>2012-02-27T09:21:53Z</dc:date>
    </item>
    <item>
      <title>Using a macro button to open an existing pdf. report ?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221302#M74124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use this...&lt;/P&gt;&lt;P&gt;Hope this code help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ReportCheck&lt;/P&gt;&lt;P&gt;set var = ActiveDocument.Variables("vCreatePDF")&lt;/P&gt;&lt;P&gt;val = var.GetContent.String&lt;/P&gt;&lt;P&gt;if val = 1 then&lt;/P&gt;&lt;P&gt;call CreateReports&lt;/P&gt;&lt;P&gt;var.SetContent 0, true&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;'Functions creates the reports in PDF format&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;sub CreateReports&lt;/P&gt;&lt;P&gt;tempFolder = "D:\DataPDF"&lt;/P&gt;&lt;P&gt;reportID = "RP01"&lt;/P&gt;&lt;P&gt;set rep = ActiveDocument.GetReport(reportID)&lt;/P&gt;&lt;P&gt;'set vShow = ActiveDocument.Variables("vShow")&lt;/P&gt;&lt;P&gt;'vShow.SetContent "on", true&lt;/P&gt;&lt;P&gt;reportName = rep.Name&lt;/P&gt;&lt;P&gt;'Create the file name with path&lt;/P&gt;&lt;P&gt;reportFile = tempFolder &amp;amp; "\" &amp;amp; reportID &amp;amp; "_" &amp;amp; reportName &amp;amp; ".pdf"&lt;/P&gt;&lt;P&gt;'print the report&lt;/P&gt;&lt;P&gt;printReportPDF reportID, tempFolder 'Call the function&lt;/P&gt;&lt;P&gt;'Rename the report&lt;/P&gt;&lt;P&gt;'checkOutputFile reportFile, tempFolder 'Call the function&lt;/P&gt;&lt;P&gt;'call ClearDefault() 'Call the function&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;'Actual function to print the PDF format without being asked for location to save&lt;/P&gt;&lt;P&gt;'***************************************************&lt;/P&gt;&lt;P&gt;function printReportPDF(oReport, pdfLocation)&lt;/P&gt;&lt;P&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\DefaultLocation", pdfLocation, "REG_SZ"&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseJobName", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\CUSTPDF Writer\UseDefaultLocation", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;'QV Print&lt;/P&gt;&lt;P&gt;ActiveDocument.PrintReport oReport, "PDFCreator",false&lt;/P&gt;&lt;P&gt;set WSHShell = nothing&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and than create the&lt;/P&gt;&lt;P&gt;"I created a trigger OnOpen to run macro "ReportCheck"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Kamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 09:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221302#M74124</guid>
      <dc:creator>kamalqlik</dc:creator>
      <dc:date>2012-02-27T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro button to open an existing pdf. report ?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221303#M74125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;I wonder whether you have ever tried to &lt;/SPAN&gt;&lt;A href="http://www.pqscan.com/pdf-to-text/"&gt;&lt;SPAN style="color: #333333;"&gt;convert pdf files into text&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="color: #333333;"&gt;? How about this one I found by Google? Any suggetsion will be appreciated. Thanks in advance.&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 05:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-button-to-open-an-existing-pdf-report/m-p/221303#M74125</guid>
      <dc:creator />
      <dc:date>2016-02-11T05:34:11Z</dc:date>
    </item>
  </channel>
</rss>

