Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kamal_sanguri
Specialist
Specialist

Load multiple QVWs one after one

Hi,

I have 3 QVWs (L1, L2 and L4) for an app, First I have to open and reload L1 (it brings data from multiple sources into Qlikview and creates QVD) after that I have to run L2 (it transforms the data and does some calculation and creates QVD), At last I have to run L4 which brings in the data from QVD created by L2 and creates dashboard with that.

I was thinking is there any way, I can run L1, L2 and L4 from L4 itself so that I don't need to open and load each QVW individually. Any suggestion would be greatly appreciated.

Thanks,


1 Solution

Accepted Solutions
jer_2011
Creator II
Creator II

hi there

create a macro in qlikview with the following code and place it in a button

sub load()

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L2.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L3.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L4.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\Lx.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

end sub

View solution in original post

6 Replies
Not applicable

Make 4

Load 3

Right?

kamal_sanguri
Specialist
Specialist
Author

  1. Yes.. Make L4 load L1 once it is completed then L2 and then
    L4
kamal_sanguri
Specialist
Specialist
Author

I have already added 3 buttons in L4 . First reloads L1
second reloads L2 and third L4. However I need all the actions in one button, When
I add all the actions to load L1, L2 and L4 in one button, all the QVWs start
loading simultaneously, But I want them to load one after one.

Anonymous
Not applicable

Create a Batch file and then create an object in QV to run the bat.

To create the batch file open notepad and write

cd  C:\Program Files\QlikView

qv.exe /r C:\...path to document 1 goes here

qv.exe /r C:\...path to document 2 goes here

etc....

Save as filename.bat

Then create a button in your main sheet to execute the bat file you created.

If you didn't do a default installation of QlikView the cd C:\Program Files\QlikView will not be the correct path

jer_2011
Creator II
Creator II

hi there

create a macro in qlikview with the following code and place it in a button

sub load()

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L2.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L3.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\L4.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

Set App = ActiveDocument.GetApplication
Set newdoc = App.opendoc ("C:\Lx.qvw")
newdoc.Activate
newdoc.reload
newdoc.save
newdoc.closedoc

end sub

kamal_sanguri
Specialist
Specialist
Author

Bingo, this is something I was looking for...cheers to you ...