Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Saving a Document Report to a file with Release 9.00.7119.4

This macro worked fine in release 8.5 but in Release 9.00.7119.4 it does not create the PDF file.

Using just the PrintDocReport, without directing the report to a file, works fine.

Any ideas in what has changed in release 9 or what needs to be changed to correct the issue?

========================================================================

The variable oReport has the document report id which is the correct one.

The variable pdfOutputFile contains the location to store the PDF and it has a correct entry.

When it starts, you do see the pop-up printing box.

Again this worked in 8.5 but not

in release 9.00.7119.4



function printReportPDF(oReport, pdfOutputFile)

Set WSHShell = CreateObject("WScript.Shell")

WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"

WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"

'QV Print

' msgbox(oReport)

ActiveDocument.GetApplication.Sleep 3000

ActiveDocument.PrintDocReport oReport, "QlikViewPDF", false

ActiveDocument.GetApplication.Sleep 3000



' msgbox(pdfOutputFile)

set WSHShell = nothing

end function



4 Replies
Anonymous
Not applicable
Author

I'm using a similar macro in a few apps as well, so I'll possibly can get the same problem if convert to QV 9.
What exactly happens? Any errors? Or just nothing at all?
Thanks.

Not applicable
Author

I am a bit confused by what is happening.

QlikView for Windows V9 updated the document and when the Document Reports are selected while in QlikView for Windows V9, it never creates the PDF files.

But if the same QlikView document is updated and reloaded by QlikView for Windows 9, and then stored for use on the Qlik WEB server, which version 8.5, the Document Report selection and creation of the PDFs works fine.

At this point I not sure if it is my PC or QlikView for Windows V9 This specific PC has had from Version 4 and on installed on it.

Anonymous
Not applicable
Author

I don't have the same exactly environment, just tested in QV 8.50 and QV9.0 - PDF printing works in both cases. thIt was unstable in QV9, and I added Sleep before calling the function. But you have this already in your macro.

Not applicable
Author

QlikTech tested the printing to a file and they did not have any problems either.

So I am guessing that it is my PC.

Thanks