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.
ok..so every monday you open your .qvw with "C:\Program Files (x86)\QlikView\Qv.exe" /r "E:\Qlikview\Documents\EveryMondayReport\ItemReport.qvw" like you posted before so after this you create in the document properties a trigger onopen to clear the selection and to load the script. do you know how to create a trigger??
then you create a trigger on PostReload where you set the variables for your date and a trigger onpostreload to run your macro.
this should send the e mail automatically.
I hope it helps you and leads you in the right direction.
regards,
MT
Hi Amelia,
What it reflects that your Start date and End date is based on the week start date and end date
So for vStart date you can use use =WeekStart(Date(Today()-1))
and for end date use =WeekEnd(Date(Today()-1))
Thanks. Where I need to give this?
I just gave this in variables values. Is that you mean. If so, is there any macro to use this?
Set the variables in QlikView and then use something like this code in the Macro:
set v = ActiveDocument.Variables("vQlikViewVariable")
v.SetContent vMacroVariable, true
R
Thanks.
It's working.
My guess is that you have set v and are using V in the SetContent so I would guess it is a problem of case .... ?
Yes you are right now it's working.
By using batch file I schedule this file to reload manually using Task scheduler. My user can able to receive the email from me through task scheduler, but there is no attached excel file. How can I set the attached file?
Sorry. Again I got a problem If I clear all selections I can able to get last week's data. May I know how to set this please?