Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I want to write VB code to open Qlikview new window but when i run below code, application get open in existing QV window which stops the other work.
Can anyone please help me on this. And is there any way /code to close the Qv window then please mention that also.
Set Qv = CreateObject("QlikTech.QlikView")
'Set docObj = Qv.OpenDoc(QvPath, 3, False)
'Set docObj = Qv.OpenDoc(QvPath, "", "")
Set docObj = Qv.OpenDoc(qvpath, 3, False)
docObj.Reload
'Sleep 40000
docObj.Save
docObj.CloseDoc
Set docObj = Nothing
Set Qv = Nothing
HI using app.Launch to open new window...first parameter is installation path(exe) second parameter is qv file path
set app= ActiveDocument.GetApplication
app.Launch "C:\Program Files\QlikView\qv.exe","E:\software\qlikview\invoice\invoice.qvw"
Hi thanks for your help.
But How can i apply it on above vb code. we can't use set app= ActiveDocument.GetApplication directly.
Thanks.
Hi,
Are you planning to open new instance of the QV application? Instead of opening a new document from the same window? Is this right? Are you looking for VB Script? And how are you triggering this code?
Thanks - DV
www.qlikshare.com
Hi Dev,
Our purpose is to open and reload qlikview using VB or C# code and i applied above mentioned code which is working fine. But if any qv doc is already open and the same time if i run above code; it got open in already running window which interrupting other application.
I am looking such code who can open new instance of Qlikview.
Thanks.
In your sample code, Qv is the app object. So
Qv.Launch
to use the sample Sarthi suggested. Or use a Shell object and run qv.exe with the /r switch.
-Rob
Hi Rob,
My proble is as below.
I have to generate some PPT and Excel sheet from QV app. As Windows schedular /Publishers does not support macro (Requested Module security==>System Access and Current local Security==> Allow System Access); I need to develop some application which open the Qv application and press macro button to generate the ppt and excel.
I am developing vb code to open and reload the report wihich is working fine but above code does not open application in seperate instance.
As per Sarathi's code i am able to launch new Qv but unable to reload that application.May be there is an error in my code.
Can you please edit the below code. thanks in advance
Set Qv = CreateObject("QlikTech.QlikView")
Qv.Launch "C:\Program Files\QlikView\qv.exe", "E:\Qlikview\Automated Report\WWW\LaunchApp.qvw"
Set docObj = Qv.OpenDoc(ReportCompletePath, 3, False)
Qv.ActiveDocument.Reload
Set Buttonn = docObj.GetSheetObject("BU01")
Ret = Buttonn.Press
docObj.Save
docObj.CloseDoc
Sleep 40000
Set docObj = Nothing
Set Qv = Nothing
If you are trying to reload the document you just opened, then
Qv.ActiveDocument.Reload
should be
docObj.Reload
-Rob