Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have qvw with macro which will send data to user email automatically. All is fine. The qvw contains two variables
VStartDate and vEndDate.
The data used to send every Monday before 12pm to user email. The completed week data will send. I,e Suppose today is Monday. so, the variables VStartDate and vEndDate contains
VStartDate=21/04/2014 and vEndDate= 25/04/2014. Like this I will manually selecting variables values every week.
My question is, Is there any solution that variables set automatic. I,e without my interference the variable should take before weeks dates. why I am asking is I don't want to miss the data any case in my absence.
Can anyone please suggest me this?
Thanks.
I need to call the macro on every Monday. This application is in personal QV edition. I no need to build in server. Personal edition is fine for this report. I scheduled the qvw through bat file in task scheduler to run on every Monday before 12pm GMT.
The path in batch file is "C:\Program Files (x86)\QlikView\Qv.exe" /r "E:\Qlikview\Documents\EveryMondayReport\ItemReport.qvw"
Try this way, i am not sure wheather it works or not, sorry if it doesn't help.
Instead of using these below variables
vStartDateScript = WeekStart(Date(Today()-1)
vEndDateScript = WeekEnd(Date(Today()-1)
try to use max and min functions on Week.
Hope it works
You mean like below
vStartDateScript =Max(WeekStart(Date(Today()-1)))
vEndDateScript = Min(WeekStart(Date(Today()-1)))
or got to document properties->actions->onopen and then you set you variables. but I still dont know when you set the action to call the macro in the document.
I tried it, but it doesn't make any difference
Thanks, Can you please explain what the below lines means?
'when you set the action to call the macro in the document.'
when do you clear your selection?? and why do you clear your selection?
you have to tell qlikview some how when you want to run the macro that sends the e mail. and my question now is how you do it? cause this "The path in batch file is "C:\Program Files (x86)\QlikView\Qv.exe" /r "E:\Qlikview\Documents\EveryMondayReport\ItemReport.qvw"" just opens the report but it doesnt run the macro automatically.
Actually all I need is in my absence also the file should go to user email every Monday with out making any selections in qvw. I need to clear the selections on every Monday before sending the file to user. Why I need to clear the selections is to select the last weeks data.
I,e suppose if I need to send the next Monday means I,e 0n 05/05/2014. I should select
vStartDateScript = 28/04/2014
vEndDateScript= 02/05/2014
so, then I will get the corresponding week data. Like this I need to send every week. My problem is I don't want to miss sending the data in my absence. I need to make the file to run even in my absence also. Please help me is it possible. I have been trying to get this since months....
Yes you are right. I need to run the macro also. Is there any way to run the macro also?