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

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

Cannot run MACRO from command line

Hello

to evrybody , I'm trying to execute this MACRO to print Report in PDF from Command Line OnPostReload.

1)If I reload the data inside QLIKVIEW , the macro is executed, If I run qlikview from command line

c:\Programmi\QlikView\qv.exe  /r /NoSecurity "file.qvw"

(This is my only way to use qlikview in batch mode because /r

"Thereafter the document will be saved, and QlikView will

close itself...f"rom the manual)

2)The Macro doesn't work and the print process hangs

If I configure macro OnOpen , I have the same problem

Which is the best way to run this macro ( in attachement) from command line?

Thanks

Oronzo

1 Solution

Accepted Solutions
kji
Employee
Employee

Use OnPostReload just as before

View solution in original post

8 Replies
kji
Employee
Employee

Try using /l instead of /r, this will perform the reload but not save and exit, you could however do save and exit in your macro (although I imagine that might be a bit annoying when doing interactive reloads).

Not applicable
Author

Thank you for your response,

but I don't know how save and exit inside the macro. Could you give me an example?

Thanks

kji
Employee
Employee

ActiveDocument.Save

ActiveDocument.GetApplication.Quit

Not applicable
Author

Thanks you Johan,

I must to know how to set the trigger condition

OnOpen?

If I set OnOpen the Macro hangs...

Thank you in advance

Oronzo

kji
Employee
Employee

Use OnPostReload just as before

Not applicable
Author

Thank you

Johan now it works !

Regards

Oronzo

rajni_batra
Specialist
Specialist

Hello John,

i have tried the same

ActiveDocument.Save

ActiveDocument.GetApplication.Quit

in my macro script but this get disappear after every reload, i dont know y this is happening plz help

Regards,

Rajni

vikasmahajan

HI I have implemented the same sucessfully....

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.