Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Valued Contributor

Re: Run Macros in QV document from Management console?

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.

11 Replies
awhitfield
Esteemed Contributor

Re: Run Macros in QV document from Management console?

156613.png

Hi Boris,

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

Regards

Andy

buzzy996
Honored Contributor II

Re: Run Macros in QV document from Management console?

try the above suggested solution.

Not applicable

Re: Run Macros in QV document from Management console?

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
Honored Contributor II

Re: Run Macros in QV document from Management console?

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

Re: Run Macros in QV document from Management console?

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
Honored Contributor II

Re: Run Macros in QV document from Management console?

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

Not applicable

Re: Run Macros in QV document from Management console?

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

Re: Run Macros in QV document from Management console?

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
Esteemed Contributor

Re: Run Macros in QV document from Management console?

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

Community Browser