Hi,
I need your help in windows command to execute qvw files.
I have below scenario.
I have 4 qvw file say a.qvw,b.qvw,c.qvw and d.qvw. Here I need set dependency.
If one of the qvw failed to reload then execution of other qvw must stop.
I have also notice if we run single qvw through batch and if it failed to reload then qv.exe is not getting close.
I need your help to resolve above 2 issue.
To run qvw through batch I am using below command
C:\Program Files\QlikView\qv.exe /r D:\Document.qvw
I have refered below thread
QlikView Desktop client command line
Let me know if any questions
Thanks and Regards,
Create a bat file like this:
C:\Program Files\QlikView\qv.exe /r D:\a.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 1
)
C:\Program Files\QlikView\qv.exe /r D:\b.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 2
)
C:\Program Files\QlikView\qv.exe /r D:\c.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 3
)
C:\Program Files\QlikView\qv.exe /r D:\d.qvw
Hi,
Try do it on your script
execute cmd.exe /c ""C:\Program Files\QlikView\Qv.exe" -r "..\..\application\a.qvw"";
execute cmd.exe /c ""C:\Program Files\QlikView\Qv.exe" -r "..\..\application\b.qvw"";
Create a bat file like this:
C:\Program Files\QlikView\qv.exe /r D:\a.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 1
)
C:\Program Files\QlikView\qv.exe /r D:\b.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 2
)
C:\Program Files\QlikView\qv.exe /r D:\c.qvw
IF %ERRORLEVEL% NEQ 0 (
exit /b 3
)
C:\Program Files\QlikView\qv.exe /r D:\d.qvw
You can set the ErrorMode in the model to prevent stopping on an error
ErrorMode 1 (default) - stop on error with option to stop or continue
ErrorMode 0 - ignore error
ErrorMode 2 - terminate failed on error
Yes of cause,
But i think this isn't necessary in this case.
Hi Sir,
can you elaborate what below command do in above script
exit /b 1
Thanks and Regards,
Hi,
exit [ExitCode]
EXIT -> Quits the CMD.EXE program or the current batch script.
/b -> Exits the current batch script.
ExitCode -> Specifies a numeric number. If /B is specified, sets ERRORLEVEL that number. If quitting CMD.EXE, sets the process exit code with that number.
An exit code of 0 means success and 1 or greater means failure.
Hi
Check this Batch file script to reload Qlikview Applications
A further possibility would be to use vbs-macros instead of command-lines, something like this could be a starting point: Re: Vbs - passing parameters to opendoc or opendocex.
Another way could be to create parameter-files which contain only some text like run/stop or successful/failure or as a variable or a table which are evaluated from the following task-steps. I use such constructs mainly to control OnOpen trigger in QV and Excel but it should be also possible to control various dependencies with these method - whereby I like the suggestions from Jonathan and would start with them.
- Marcus
You can also create a batch file like below,
"C:\Program Files\QlikView\qv.exe" /R "D:\a.qvw" || GOTO:eof
"C:\Program Files\QlikView\qv.exe" /R "D:\b.qvw" || GOTO:eof
"C:\Program Files\QlikView\qv.exe" /R "D:\c.qvw" || GOTO:eof
"C:\Program Files\QlikView\qv.exe" /R "D:\d.qvw"