Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ivan_will
Partner - Creator II
Partner - Creator II

Run Macro through QV Server v.10 ?

Is it possible to run macros on post reload when the document is reloaded by a qlikview server v10. In v9 I know that is not possible.

11 Replies
colinh
Partner - Creator II
Partner - Creator II

Hi Ivan

No, you can't run macros and you can't run Alerts that send a mail. I confirmed this with someone from QlikTech when version 10 was released.

Colin

Anonymous
Not applicable

Colin, Your post scares me! Can you clarify your statement: "No, you can't run macros and you can't run Alerts that send a mail." Is that only when using the "Post Reload" triggers from the server?

JS

Miguel_Angel_Baeyens

Hi,

Pasted from the v10 SR1 Reference Manual:

The following triggers will work as usual in the QlikView Server environmentregardless of which client is used:Document.OnAnySelect352Field.OnSelectField.OnChangeField.OnUnlockDocument.OnPressMacroButtonVariable.OnChangeVariable.OnInputThe following triggers are not to be used in the QlikView Server environment, sincethey lack meaning or may cause unexpected results:OnPostReduceDataOnPostReload


I'd add that in my experience, OnOpen macros don't work when the document is opened from the server with any client.

Besides, macro functionality is different between AJAX client and Desktop/IE Plugin, so test before keep developing your macros.

Hope that helps.

vgutkovsky
Master II
Master II

I can confirm that (by design) PostReload macros don't work on Publisher reloads. Sorry to be the bearer of bad news!

colinh
Partner - Creator II
Partner - Creator II

Sorry, JS, didn't mean to scare you... 🙂 Miguel and Vlad have pretty much answered your question, but just to clarify what I meant: if a document is reloaded through QlikView Publisher or Server, any action triggered by the OnPostReload trigger will not run. I guess this is to prevent the execution of potentially harmful macros. Also, if you have an Alert setup that sends a mail, it will not be triggered if the document is reloaded through Server.

So if you have any macros that, for example, email out a .pdf report, or if you have an Alert that checks if a value is within certain parameters, or checks if some condition is met, you will need to run those documents using a batch file and Windows Scheduler.

Hope this is clearer.

Colin.

vgutkovsky
Master II
Master II

Or instead of Windows Scheduler, you can use "Supporting Tasks" in the QEMC to schedule it with Publisher...

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


Colin Hancox wrote:Also, if you have an Alert setup that sends a mail, it will not be triggered if the document is reloaded through Server.


I disagree. In V9, OnPostReload Alerts can send emails. See http://qlikviewnotes.blogspot.com/2010/09/monitoring-reload-schedule.html. I have not confirmed that this still works in V10, but to my knowledge this has not changed.

colinh
Partner - Creator II
Partner - Creator II

Vlad, we don't have Publisher, only QlikView Server, so Supporting Tasks is not available, that sheet in the QEMC is just blank. Is there another way to run batch jobs from QlikView Server? I suspect that without Publisher we are limited to using Windows Scheduler.

colinh
Partner - Creator II
Partner - Creator II

Rob, that's very interesting, thanks for the link. I have a set of QlikView documents that do the same thing your File Age Monitor does - monitor the file ages of QVDs transferred from remote servers. I originally tried to run them through QlikView Server and the emails definitely did not get sent - I did quite a lot of testing.

If you've got it working though then I will try it again, maybe I missed something.