Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run Macros in QV document from Management console?

Hi,

I have some PostReload macros I'm running.

The issue is that when I reload the model from the management console, the macro isn't activated.

is there a way to override it?

Thanks,

Boris

1 Solution

Accepted Solutions
luciancotea
Specialist
Specialist

The OnPostReload event is not fired after a server reload. You will need to use a batch load using QV desktop to perform the reload.

This is the correct answer. Server CAN execute macros. The problem is with the trigger.

View solution in original post

11 Replies
awhitfield
Partner - Champion
Partner - Champion

156613.png

Hi Boris,

the control settings for this are in QMC: System>Setup>QVSERVER> Security tab

Regards

Andy

buzzy996
Master II
Master II

try the above suggested solution.

Not applicable
Author

Didn't help.

Also checked the unsafe macros.

it works when I run it manually from the modeler but not with QMC execution.

This is the macro:

SUB ExportChartToCSV

     SET  objChart = ActiveDocument.GetSheetObject("BorisTest")

     objChart.Export "C:\Data.CSV", ", "

END SUB

it exports 1 chart.

buzzy996
Master II
Master II

C drive is mapped with ur server? else u can place ur CSV file whichever the drive mapped with ur server and try.

Not applicable
Author

Tried to change drives.

didn't help.

it works manually from the modeler with regular reload, but not by using the reload from QMC.

buzzy996
Master II
Master II

from the above image, there is check box Allow unsafe macro execution on server? pls select & save ....try!

Not applicable
Author

unfortunately, you can see in my first comment that I already did it...

Do you have a server to try a sample that I'll send you?

Not applicable
Author

Tried it all, even allowing acces to system from Macro VB script editor.

I created a button to execute the same macro, it works from access point but doesn't work from QMC task console reload.

might it be that the only possible way to execute it is through creating a batch file that reloads the model?

Thanks,

Boris

awhitfield
Partner - Champion
Partner - Champion

Hi Boris,

apparently you can't get a QMC to execute a macro, you need to run it from a .bat file, executed from Windows scheduler, see the following thread: http://community.qlik.com/thread/115808