Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

PostReload trigger not working in Command line execution

I have some code that spits out a pdf report to a file location. (shown at the bottom of this thread)

The macro is triggered on a post re-load. It works fine when I load the document manually but does not spit out the pdf document when i do a commmand line execution (shown below)

I've tried this on version 9 release 2 and version 9 release 4.

Any ideas on getting this to work?


"D:\Program Files\QlikView\QV.exe" /r D:\SIPMobile\CallCenterMblDroid.qvw


code to spit out the pdf shown below


sub PrintReport
Set WSHShell = CreateObject("WScript.Shell")
fln = "\\Fcqvprod01\inphonicdashboards$\MblCopy\QVOAMBL.pdf"
RegKey = "HKEY_CURRENT_USER\Software\QlikViewPDF"
WSHShell.RegWrite RegKey & "BypassSaveAs", 1
WSHShell.RegWrite RegKey & "OutputFile", fln
ActiveDocument.GetApplication.Sleep 2000
ActiveDocument.PrintDocReport "RP01", "QlikViewPDF"
Set WSHShell = nothing
end sub


1 Reply
Not applicable
Author

Hi Jonathan,

I had a similar problem a couple of years ago (in QV 7) and I created a workaround by replacing the /r with /l in the command string and adding the command "ActiveDocument.GetApplication.Quit" to the end of the macro.

BR

/Peter