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: 
wadestiell
Contributor
Contributor

QV External program task hanging

HI,

I am trying to refresh a QV document which executes a macro through a post reload trigger.  I can execute this fine either by using the following command in a .bat file or by executing the command directly in a command prompt:

"C:\Program Files\QlikView\qv.exe" /r "C:\QlikView Source\Manufacturing\ClearView\Export Test 2.qvw"

However, when I execute either a call to the batchfile or the refresh statement above directly, through the QEMC using a Command line statement in an External program, the task just hangs.  I can see that the qv.exe process has executed as each time I can see it appear immediately in the Windows Task Manager but the task never ends until I kill the Windows process (it should only take about 2 seconds).  Is there something I'm missing here?  Maybe another command line switch?

I'm using QVS 10 SR3 on Windows Server 2003 R2.

Thanks,

Wade

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Is QV Developer licensed and installed for the userid running the distribution service?

2. What does the document log say?

-Rob

View solution in original post

9 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add the

/NoSecurity

switch to the command line.

-Rob

http://robwunderlich.com

wadestiell
Contributor
Contributor
Author

Thanks Rob,

I tried using the /nosecurity switch as below both directly in the external task command line and from a batch file being called from the external task command line.  Both times I get the same result (the task hangs).  Do you have any ideas of whether there are document or server settings that need to be made to allow this?

"C:\Program Files\QlikView\qv.exe" /r /NoSecurity "C:\QlikView Source\Manufacturing\ClearView\Export Test 2.qvw"

Thanks,

Wade

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Is QV Developer licensed and installed for the userid running the distribution service?

2. What does the document log say?

-Rob

wadestiell
Contributor
Contributor
Author

Thanks again Rob.

I just assigned a CAL to the service account and that did the trick!

Thanks for your help.

Wade

Not applicable

Rob, Wade:

I've the exact same problem. I'm using a similar command like you have above.

I'm able to run this from the command line on the QV Server. I've also assigned a Named User license to the services account. I've turned off macro checking on the server and turned off similar check boxes in the Document Properties.

QV.exe starts, but it's not even generating the log file.

Thanks in advance for any suggestions!

--Magesh

Not applicable

I got past this issue... We had to lease the license by connecting to prod server as the services account. Now, the issue is during macro execution. QV.exe dies, but Excel is still running. Macro is trying to find the selections, but QV is not there. Trying to figure out why QV dies.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think the problem may be that the /r switch tells qv to exit after the reload. It doesn't hang around for the PostReload macro to run. A possible solution would be to code the macro as an external VBS routine that can be run with csrcipt.exe. The vbs can open the qv document, do the work, and close the document and exit.

-Rob

wadestiell
Contributor
Contributor
Author

Magesh,

what is your macro doing?  In my case, I am exporting pivot tables to csv files as follows:

 

vExportDir = "C:\QlikView Source\Surgical\Surgical Sales Analytics\"
set obj = ActiveDocument.GetSheetObject("CH01")
obj.Export vExportDir & "STM.csv",","
set obj = ActiveDocument.GetSheetObject("CH02")
obj.Export vExportDir & "SES.csv",","
set obj = ActiveDocument.GetSheetObject("CH03")
obj.Export vExportDir & "COS.csv",","
set obj = ActiveDocument.GetSheetObject("CH04")
obj.Export vExportDir & "Daily Sales by acct.csv",","
set obj = ActiveDocument.GetSheetObject("CH05")
obj.Export vExportDir & "CTM.csv",","

-Wade

Not applicable

Rob and Wade,

Thank you for your quick reply! We have decided to abandon this task for now. Hopefully we would be able to leverage NPrinting for this in the future.

Thanks,
Magesh