<?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 Is it possible to write a function to print a sheet (not report)? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222763#M75341</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'm a new QlikView customer running SBE Version 10 with the latest service pack.&lt;/P&gt;&lt;P&gt;I have a few daily sheets with are daily reports, which I am planning to batch generate every day using a windows scheduled task. This has been well covered in other posts.&lt;/P&gt;&lt;P&gt;My sheets are already formatted nicely to fit onto a single page, and I found that after converting one of them into a report, I had to do some extra rework by recreating captions (which do not apparently get carried over into the report and ran into limitation such as not being able to use date functions within the header (to display yesterday's date for example using Today()-1.&lt;/P&gt;&lt;P&gt;My question is:&lt;/P&gt;&lt;P&gt;- Is it possible to write a function that prints the Sheet Object?&lt;/P&gt;&lt;P&gt;All of the examples I have seen provide the ID of a report with the "RP" prefix. I have tried replacing the report id with that of a sheet with no luck. There does not appear to be a "PrintSheet" method either. While I suppose reports are objects which are intended for printing, I don't understand why it wouldn't be possible to automate the printing of a sheet since this can be done manually using File &amp;gt; Print Sheet.&lt;/P&gt;&lt;P&gt;The function I have works fine for a report:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Function printReportPDF&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ActiveDocument.PrintReport "RP01", "PDF-XChange 3.0", false&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;objFSO.MoveFile "C:\TestPDF\QlikView Printing.pdf", "C:\TestPDF\Exec.pdf"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Function&lt;/P&gt;&lt;P&gt;I would appreciate any direction on this, and welcome your thoughts in general on the benefits of report printing vs sheet printing. I have already gathered the obvious points which are pointed out in the manual (i.e.: ability to compile a specific selection of charts, reformatting dashboard objects into a traditional report format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jouni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2011 02:03:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-20T02:03:44Z</dc:date>
    <item>
      <title>Is it possible to write a function to print a sheet (not report)?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222763#M75341</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'm a new QlikView customer running SBE Version 10 with the latest service pack.&lt;/P&gt;&lt;P&gt;I have a few daily sheets with are daily reports, which I am planning to batch generate every day using a windows scheduled task. This has been well covered in other posts.&lt;/P&gt;&lt;P&gt;My sheets are already formatted nicely to fit onto a single page, and I found that after converting one of them into a report, I had to do some extra rework by recreating captions (which do not apparently get carried over into the report and ran into limitation such as not being able to use date functions within the header (to display yesterday's date for example using Today()-1.&lt;/P&gt;&lt;P&gt;My question is:&lt;/P&gt;&lt;P&gt;- Is it possible to write a function that prints the Sheet Object?&lt;/P&gt;&lt;P&gt;All of the examples I have seen provide the ID of a report with the "RP" prefix. I have tried replacing the report id with that of a sheet with no luck. There does not appear to be a "PrintSheet" method either. While I suppose reports are objects which are intended for printing, I don't understand why it wouldn't be possible to automate the printing of a sheet since this can be done manually using File &amp;gt; Print Sheet.&lt;/P&gt;&lt;P&gt;The function I have works fine for a report:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Function printReportPDF&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ActiveDocument.PrintReport "RP01", "PDF-XChange 3.0", false&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;objFSO.MoveFile "C:\TestPDF\QlikView Printing.pdf", "C:\TestPDF\Exec.pdf"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Function&lt;/P&gt;&lt;P&gt;I would appreciate any direction on this, and welcome your thoughts in general on the benefits of report printing vs sheet printing. I have already gathered the obvious points which are pointed out in the manual (i.e.: ability to compile a specific selection of charts, reformatting dashboard objects into a traditional report format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jouni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 02:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222763#M75341</guid>
      <dc:creator />
      <dc:date>2011-04-20T02:03:44Z</dc:date>
    </item>
    <item>
      <title>Is it possible to write a function to print a sheet (not report)?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222764#M75342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually there is a PrintSheet method.&lt;/P&gt;&lt;P&gt;Please, try to adapt this code to your app (this prints the first sheet)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sub print&lt;BR /&gt;set ss= ActiveDocument.GetSheet(0)&lt;BR /&gt;ss.print&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 04:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222764#M75342</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-20T04:06:32Z</dc:date>
    </item>
    <item>
      <title>Is it possible to write a function to print a sheet (not report)?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222765#M75343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Export&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempFolder="D:\Upendra\"&lt;/P&gt;&lt;P&gt;reportName="TestDashboard"&lt;/P&gt;&lt;P&gt;reportFile = tempFolder &amp;amp; reportName &amp;amp; day(date) &amp;amp; monthname(month(date))&amp;amp;".pdf"&lt;/P&gt;&lt;P&gt;'msgbox reportFile&lt;/P&gt;&lt;P&gt;printReportPDF reportFile&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.Sleep 5000&lt;/P&gt;&lt;P&gt;ActiveDocument.sheets("SH05").Print&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.Sleep 5000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' SendMail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'msgbox "saved."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;'===========================================================================&lt;/P&gt;&lt;P&gt;Function printReportPDF(pdfOutputFile)&lt;/P&gt;&lt;P&gt;Set WSHShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\QlikviewPDF\OutputFile", pdfOutputFile, "REG_SZ"&lt;/P&gt;&lt;P&gt;WSHShell.RegWrite "HKCU\Software\QlikviewPDF\BypassSaveAs", "1", "REG_SZ"&lt;/P&gt;&lt;P&gt;Set WSHShell = nothing&lt;/P&gt;&lt;P&gt;End function&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 05:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222765#M75343</guid>
      <dc:creator />
      <dc:date>2011-04-20T05:25:42Z</dc:date>
    </item>
    <item>
      <title>Is it possible to write a function to print a sheet (not report)?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222766#M75344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you gentlemen for the advice. I was able to print the sheet using either method. Getting the sheet by ID is more convenient, but both methods work the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:20:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222766#M75344</guid>
      <dc:creator />
      <dc:date>2011-04-27T19:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to write a function to print a sheet (not report)?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222767#M75345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi upendra11,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your post . I tried your macro ans it works good .&lt;/P&gt;&lt;P&gt;Im asking you if we can print mutilple &lt;STRONG&gt;Sheets&lt;/STRONG&gt; in the same PDF document then &lt;STRONG&gt;save&lt;/STRONG&gt; this .PDF in a folder automatically ( without the windo appending to save documents) ?? Thnks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 10:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-write-a-function-to-print-a-sheet-not-report/m-p/222767#M75345</guid>
      <dc:creator />
      <dc:date>2014-05-14T10:01:50Z</dc:date>
    </item>
  </channel>
</rss>

