Using Macros in QV Documents on the QV-Server

Macros on QlikView Server

QlikView Server can execute macros in QlikView documents. Due to client-server environment some considerations must be taken when using macros.

When using QlikView as a client all macros are executed in the client. In this case more operations can be permitted.

Note: Using macros extensively may lead to potential problems with macros executing in parallel instead of as sequentially, as a designer might have intended/assumed.

Macro functionality limitations

Functionality that will normally work well in macros in the QlikView Server environment with any type of client is:

  • Logical operations such as clearing or selecting in fields
  • Operations related to variables

The following types of functionality are not to be used in the QlikView Server environment , as they may cause unexpected results:

  • Layout operations acting on the properties of sheets and sheet objects via SetProperties
  • Operations changing document or user settings
  • All operations related to the script, including Reload
  • Data reduction operations, e.g. ReduceData
  • Operations such as Save and Open document
Note: Layout operations acting on the properties of Server objects are supported.

Macro trigger limitations

The following triggers will work as usual in the QlikView Server environment for all clients, except AJAX mode which doesn't support event triggers:

Document.OnAnySelect

Field.OnSelect

Field.OnChange

Field.OnUnlock

Document.OnPressMacroButton

Variable.OnChange

Variable.OnInput

The following triggers are not to be used in the QlikView Server environment, since they lack meaning or may cause unexpected results:

OnPostReduceData

OnPostReload

VBScript functions

VBScript functions defined in the module of a QlikView document will generally work well on QlikView Server. General functionality limitations as defined in the previous section apply.

Server Side Export

It is possible to export the content of any chart to a text file on the server by using a Macro connected to a Button. This feature has to be added in the QlikView document and then the macro can be executed from the QlikView Server directly in the web browser.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?