Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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?

Specialist
Specialist

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

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.

Creator III
Creator III

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

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

Specialist
Specialist

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