Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

macros not working on server

Hi All,

I have created macros within a Qlikview application. They work fine when run from the desktop client, but will not run when run from Accesspoint.

Can anyone shed any light on it? The macro is a simple export macro which writes out a few variables to a text file. The text file is located on the server itself and all paths are correct.

Thanks

Dan

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Dan,

There are a lot of posts about this issue. In the server environment, some macros will not work, according to its design. Anyway, there are two points worth noting:

  1. Make sure you are granting System Access to your macros in the server through QEMC (System, Setup, QlikView Servers, expand and click, Seucrity tab in the right pane "Allow unsafe macro execution on server" and "Allow macro execution on server" ticked) and in the Macro editor, (Ctrl + M, bottom left drop downs)
  2. If they are creating some filesystem object (such an excel file) make sure you are using the IE Plugin.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

11 Replies
Miguel_Angel_Baeyens

Hi Dan,

There are a lot of posts about this issue. In the server environment, some macros will not work, according to its design. Anyway, there are two points worth noting:

  1. Make sure you are granting System Access to your macros in the server through QEMC (System, Setup, QlikView Servers, expand and click, Seucrity tab in the right pane "Allow unsafe macro execution on server" and "Allow macro execution on server" ticked) and in the Macro editor, (Ctrl + M, bottom left drop downs)
  2. If they are creating some filesystem object (such an excel file) make sure you are using the IE Plugin.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi,

Please enable the Allow unsafe macro in enterprise management console, please see the image attached

HTH

Reg,

Shubhu

Not applicable
Author

Thanks Miguel. It does work when used with the IE plugin rather than AJAX. This is a little dissappointing as we were trying to use zero footprint clients as a company.

Not applicable
Author

Hello to everybody, I'm trying

to execeute this macro on the server

Sub TEST

Dim obj

Set obj = CreateObject("WScript.Shell")

obj.Run "c:\test.bat ", , TRUE

End Sub

This Macro write a file txt on the server.

I have put this option

  1. Make sure you are granting System Access to your macros in the server through QEMC (System, Setup, QlikView Servers, expand and click, Seucrity tab in the right pane "Allow unsafe macro execution on server" and "Allow macro execution on server" ticked) and in the Macro editor, (Ctrl + M, bottom left drop downs)
  2. If they are creating some filesystem object (such an excel file) make sure you are using the IE Plugin.

But the macro don't run on the server.

What I must to check ?

Thanks

Oronzo

Miguel_Angel_Baeyens

Hi Oronzo,

Note that macros do not behave in Server as they do in Desktop. There are some limitations to start with, and they are documented in the Reference Manual. Besides, macro code is usually executed in the computer from where it is called, so if you are clicking a button in the Plugin, the macro will execute (meaning that it will look for paths, applications and so) in the Plugin computer, not in the Server. In addition, there are some things that the Plugin is able to perform (such as object modification) but the Ajax client is not (because it does not use the ActiveX controls that only work in Windows devices)

So you can create a test.bat in your computer and try to trigger it as you are already doing, or if the file is in the Server, then use a UNC path (in the form \\Server\Folder\file.bat ) that is available to the user that is running the application.

Hope that helps.

Miguel

Not applicable
Author

Thank you Miguel Angel,

Reading all the post,I think it's better to use task with QLIKVIEW PUBLISHER.

Regards

Oronzo

Not applicable
Author

Hi Miguel Angel Baeyens

It gives problem on Access point and in server it is workingg fine. In access point macro is not triggering even I have given a msgbox to display hello and this pop up is also not coming...

Please help me.

Thanks in advance

vinicius_siquei
Partner - Contributor III
Partner - Contributor III

Great Miguel ! You suggestion make it work fine!

Not applicable
Author

Hi Miguel --

Could you expand on #2?  Which IE plugin are you referring to?  How is it used on the server?

Many thanks,

Dave