Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a w2k8 scheduled task that performs a dashboard synchonization.
The task executes something like:
qv.exe /r /nosecurity "c:\mydashboard.qvw"
The problem comes here. The load script imports data from sources and sometimes these sources can be not available.
What happens? Easy, the reload task remains stalled because of a prompt dialog is displayed and no asnwer is provided. The way to know that this happened is killing the task, opening the dasboard log and executing the reload in a windows session.
My question is: is there any way to reload the dashboard using qv.exe in a 'noninteractive way' in order to avoid any promp dialog?
I know that I can avoid any script error....but this is dangerous.
Regards,
JOS
Hi Jos,
The answer is ErrorMode =2, setting ErrorMode will ensure that job exists instead of hanging and waiting user response, when there is failure (non-interactive)
Have a read of Error Variable...
Regards
Kulbir
This may or may not work but you can turn off Warnings from within the script, all you need to do is to add:
Set ErrorMode =1;
Place it after the date format 'Sets' at the start of the script.
Search for 'Error Variables' in the Help file.
Fingers crossed,
Matt - Visual Analytics Ltd
Qlikview Design Blog: http://QVDesign.wordpress.com
Hi Jos,
The answer is ErrorMode =2, setting ErrorMode will ensure that job exists instead of hanging and waiting user response, when there is failure (non-interactive)
Have a read of Error Variable...
Regards
Kulbir
It might be seen as rather dangerous to use ErrorMode but hanging up and waiting for a response and stopping other reloads is arguably even worse!
It is possible to make it less so though.
I have spreadsheets that contain the email address of the developer(s) and also of the key user/administrators of the document. When the document is reloaded in batch (using the /r switch) I also pass the named pair of a variable VRELOAD so I can detect this in the script.
Here is the code - note the comments re the alerts (jpeg attached) and OnPostReload actions.
LET vDocumentName = capitalize(trim(replace(upper(DocumentName()), '.QVW', ' ')));
SET vRelPath = '..\'; // path to server folders
SET vUserPath = 'J:\pathname\'; // path to user maintained folders
// If any errors in batch reload then ignore them and let the script finish - as ScriptErrorCount <> 0 an alert will fire
// to email the developers. A separate alert fires to email the (data) administrators confirming the reload and the counts
// of script and other errors.
// Note OnPostReload action (which is always executed even if the script had errors) sets VRELOAD to 0 and ErrorMode to 1
IF VRELOAD = 1 THEN
SET ErrorMode = 0; // batch - ignore any failure and alert is triggered at end
[tDevelopers]:
LOAD concat(distinct [Developer Email], ';') as Developers
FROM $(vRelPath)Developer.xls (biff, embedded labels, table is [$(vDocumentName)$]);
LET vDevelopers = peek('Developers', 0, 'tDevelopers');
DROP TABLE [tDevelopers];
[tAdministrators]:
LOAD concat(distinct [Email address], ';') as Administrators
FROM $(vUserPath)Distribution Lists.xls (biff, embedded labels, table is [$(vDocumentName)$]);
LET vAdministrators = peek('Administrators', 0, 'tAdministrators');
DROP TABLE [tAdministrators];
ELSE
SET ErrorMode = 1; // interactive - halt on any failure
END IF
Regards,
Gordon
set ErrorMode =2 is good enought for me...thanks all you
Hello,
I have the same problem and when I try to run a batch that reload the data
Qv.exe hangs.
Did I set Error Mode inside the load Script ?
Regards
Oronzo