Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to select variable values automatically?

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.

53 Replies
Not applicable
Author

ok...so i think we have to start here all over.

if i understand you right every monday this file is automatically opened and then you clear the selections and then you set your date variables? and what are you doing next then? in what format do you send the e-mail?? and how do you send the e-mail?? have you programmed a macro yet to send the e-mail or are you doing it by hand. you have to give me very detailed information in order for me to help you right now.

regards

Not applicable
Author

Thanks.

Every Monday the qvw file is manually opened and then I clear the earlier selections and reload the qvw, then I set date variables?

Based on date variables I will get the corresponding week data. Then I will send to excel. Then I send that excel to user email. All this is manual process up to now. But I don't want to do this manually. instead all I need is to do automatic from starting to ending. so that' why to check I wrote the macro. I create da button in qvw to run the macro. The macro is working fine by manually clicking the button.

Not applicable
Author

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

Not applicable
Author

Thanks.

Can you please explain a bit more please. I want to schedule the batch file in task scheduler. so, completely I don't want the human work. All I need the file automatic reload and automatic to user email.

Please if you don't mind can you post step by step that would be really appreciate.

Not applicable
Author

ok do you know how to schedule the batch in task scheduler??

I could post it step by step but my problem is that I have QlikView in German so I dont think it would help you if i post it. do you know how to get to document properties?? and do you know how to set a trigger??

Not applicable
Author

Thanks. Yes all I know. Ok I will do it and let you know.

Not applicable
Author

Just reaching to destination. Small confirmation please. The task scheduler is running  fine. But the qvw is reloading twice. After reloading my user getting email with attached. But the command prompt is not closing. How can I set this?

Not applicable
Author

i created a .bat-file with this line to close it taskkill /F /IM qv.exe it is killing the thread. that was the only way i found out to do it. why it is reloading twice i can't tell you

Not applicable
Author

Thanks. Where I need to give the above path? to close the command prompt after reloading the qvw.

Not applicable
Author

Do I need to give in the same batch file? where I created batch file to run qvw