Qlik Sense documentation and resources.
This solution uses QlikView macro and server-side Windows task to perform user-initiated reload from QlikView web client.
In short: create windows task on server to reload the qvw; create button in document to run the windows task via macro. You also need to adjust some server settings and configure the button behaviour to be intuitive. See attached sample QVW.
Finally configure the button’s behaviour: it shoud be disabled after press and re-enabled after reload completed. For this create a variable vReloadStarted. This variable will get now() value when button is pressed and 0 value during script reload. The button is enabled only when value is 0. The button shoud be enabled only in browser mode (not in desktop). There is also some dynamic text and help text to ensure best user experience, see attached QVW.
Thanks for sharing your document.
It works perfectly
Glad to hear that!
How can I use a variable in your solution? For example, I select November 2017 in my application and I need to just reload data for November 2017.
I check out command schtasks /run, it seems that I cannot add a more parameters to the command.
You can expand macro to export the variables into a text file before the reload command.
Then pick it up in the reload script.
Example of export into txt file via macro:
set table = ActiveDocument.GetSheetObject("CH10")
table.ServerSideExportEx "C:\QlikView\System\Reload_Parameters.txt" , ";" , 1, 1257
The load script probably needs some additional logic to distinguish between "user reload" and "regular reload". For this you may pass additional variable vUserReload = 1 from the BAT file:
"C:\Program Files\QlikView\Distribution Service\QVDistributionService.exe" -r="C:\QlikView\Live\MyDoc.qvw" -variablename=vUserReload -variablevalue=1
Hi, I'm having some trouble with this, I've performed step two:
Enable Batch Mode in QV Distribution Service settings:
Edit the file C:\Program Files\QlikViewServer\Distribution Service\QVDistributionService.exe.config –
find the line <add key="EnableBatchMode" value="false"/>
and set it to "true". After that restart distribution service.
but when I run my .bat file it gives the error:
21/09/2018 00:14:48 Information Setting RunLevel to Batch
21/09/2018 00:14:48 Error Can not run in batch mode. EnableBatchMode is set to false.
any ideas why this could be? I can clearly see in the file it says true, and I've restarted the service a couple of times now, it still isn't registering it?
What's your setup - single or multiple QVS instances, with or without publisher?
hi, I've done as advised (in Step 4 the task works as expected).
but when I press the reload button in the IE client or in Desktop client, I just see shortly a black screen popping up and disappearing, and reload does not work.
single instance, no publisher, any hint what I am doing wrong?
Is there a way to make this work in the desktop version when I'm connecting to a server? This solution only works in AccessPoint.