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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Macro only for specific charts

     Hi Everyone,

I need some help on writing the conditional macro. Daily am running my macro 2 times through windows scheduler .(with batch file creation).

Requirement : 1..when am run my macro first time it should go to users mail with only chart 1 and chart 2 only..Not the Chart 3.

2..When am run the second time only my chart 3 should export and save some where...No need to send any mail.

Here am attaching my sample application with macro.

Let me know if in case of any gap about the requirement.

More Thanks,

Ajay

Labels (1)
4 Replies
giakoum
Partner - Master II
Partner - Master II

You could combine both in one and use a variable to check if it is the 1st or 2nd time the reload happens.

If variable = 0 then (1st time)

     variable = 1

     sent email

If variable = 1 then (2nd time and resetting the variable)

     export chart

     variable = 0 

That means that every 2 runs, it will export the chart.

ajaykumar1
Creator III
Creator III
Author

Thanks Ioannis for your quick resonse.

Do you have any above mentioned code with you, that will be great help for me.

Thanks,

Ajay

giakoum
Partner - Master II
Partner - Master II

petter
Partner - Champion III
Partner - Champion III

By calling your QVW from Windows Task Scheduler and using QV.EXE command line parameters you can set variables that the application will use from the command line. Using those variables you can control which reports/charts are exported to Excel and whether they should be printed or not:

2015-10-13 #2.PNG