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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro issue???

Hello,

I have created a macro, which exports the chart to excel and sending it through email. It works fine when i press the reload button.

I just want to automate this process through Task Scheduler( Reloading &  running macro).

Iam using the following command for reloading but its not running the macros after reload ( Setting in Documents properties->Post Load -> run macro -> 'Macroname')

Reload.bat file: (Calling this file through task schedular)

"C:\Program Files\QlikView\qv.exe" /r "D:\Qlikview Applications\Buckinghamshire.qvw"

Its reloading the qvw file but macro are not executing after reload....

Any help is much appreciated...

Regards

Siva Rama

6 Replies
Not applicable
Author

try this for make batch file

HERE REPLACE r by L

"C:\Program Files\QlikView\qv.exe" /I "D:\Qlikview Applications\Buckinghamshire.qvw"

Not applicable
Author

since /r not reload the script file. only showing reload because it reload externally.

but /l reload the whole script.

In macro you must allow the  SYSTEM ACCESS and also the ALLOW SYSTEM ACCESS

Not applicable
Author

Vishwaranjan,

Thanks for your prompt reply.

Its working fine, when i double click Reload.bat file.

But when i start running this Reload.bat file throughTask Schedular... Its reloading the qvw file but post reload macros are not running...

Any clues...

Regards

Siva

Not applicable
Author

Vishwa,

Please check the attachments for reference.

Its working fine, but not executing  through task schedular. Please help.

Regards

S

Not applicable
Author

I think you miss some steps in macro.

go to macro script

then on Requeste module security   ---> select   System Access

  and  Current Local Security    ---->   select  Allow System access

then ok.

Not applicable
Author

Thank you very much for your help at the right time.

In my case, Its because of the Task Schedular. We are running it from Normal User, instead of Administrator. the option we selected is 'Run only when user is logged on' to excecute the task. The task is executing without any issues, if i keep the session(user connection) open all the time or when the task is started executing.

If i select the second option('Run whether user is logged on or not'), the task is not executing with macros.

Its Strange behaviour.

Regards

Siva Rama