Pages

11 June 2012

Qlikview: How to refresh/reload data automatically in qlikview desktop

If you do not have qlikview server, you can refresh/reload your qlikview application by windows scheduled tasks.

Let's say you have a qlikview application named as ReloadME.qvw and it should be reloaded automatically everyday at 02:00 am.

Here is how you can do this:

Assumptions:
1) ReloadME.QVW is under C:\Temp folder
2) Qlikview's executable file (i.e. QV.EXE) is under C:\Program Files\QlikView folder


Steps:
1) Create a bat file with the following lines and name it ReloadMe.bat
       cd C:\Program Files\QlikView
       qv.exe /r C:\Temp\test.qvw
A sample file is in the following zipped file: https://sites.google.com/site/quickdevtips/home/ReloadMe.rar?attredirects=0&d=1
Hint: A bat file can be simply created by renaming a txt file (e.g. test.txt) as a bat file (e.g. test.bat) and can be edited by notepad.


2) Create a windows scheduled task (In Windows 7, its location is Control Panel --> All Control Panel Items --> Administrative Tools --> Task Scheduler) which will run ReloadMe.bat everyday at 02:00 am.



8 comments:

  1. Hi, Great idea, exactly what I was looking for! Aydin, one more question to this topic. I dont have an access to QlikView Enterprise Management Concile and for this reason cannot schedule there my Applikation reload. QlikView Applikation is on Server and many people use/open it from the Server. Can I use the same approach as you mentioned to reload my Applikation from Server? If yes, where should bat file be stored and on which computer should the task me scheduled?

    ReplyDelete
  2. Hi,

    I think there are two options:

    1) If you are able to open a qlikview file (.qvw) which is hosted on the server from your qlikview desktop application on your computer, then you can try something like below in a batch file which is on your computer.

    cd C:\Program Files\QlikView
    qv.exe /r \\servername\C\ProgramData\QlikTech\Documents

    And, either run this file manually when necessary or schedule a windows task on your computer.


    2) Create both the batch file and windows scheduled tasks on the server.
    Since the batch is, basically, running qlikview desktop application, if you do not have qlikview desktop installed on the server, this option would not work.

    ReplyDelete
  3. Great idea.
    But I have 80 qlikview files with a macro to export to a .csv file. So, can i create 80 batch files and give the trigger at the same time?

    ReplyDelete
  4. Yes, I believe so.
    Another option might be to run them from the same batch file:

    cd C:\Program Files\QlikView
    qv.exe /r C:\Temp\test1.qvw
    qv.exe /r C:\Temp\test2.qvw
    qv.exe /r C:\Temp\test3.qvw

    But, in that case, I do not know if they will be run in parallel or in series. You can simply try and see.






    ReplyDelete
  5. For anyone wondering, I tested this, and they do run in series when you run multiple QVWs from the same batch file.

    ReplyDelete
  6. Just wanted to add that if you store the Batch File in a directory the beginning syntax should be: CD /D C:\Program Files\QlikView

    ReplyDelete
  7. There are interesting alternatives ... but I need to update from a buttom(update) into a file exe that I give to each user in my network. It is possible?

    ReplyDelete
  8. This works for me but if i have OnPostReload macro I am getting the error Failed to open document

    ReplyDelete