Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro parse failed

Hi,

I'm trying to implement a dynamic cyclic group. Therefore I have created a little macro which should do the trick. Problem is that the macro is running in QlikView client without any issues but not using a browser.

The macro code is kind of simple like this:

Sub DynamicGroup
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.RemoveGroup "CyclicGroup1"
Set gr = ActiveDocument.CreateGroup("CyclicGroup1")
gr.AddField "Field1"
gr.AddField "Field2"
dim x(2)
set gp = ActiveDocument.GetGroup("CyclicGroup1").GetProperties
x(1) = "FIELD1"
x(2) = "FIELD2"
gp.Labels = x
gp.IsCyclic = true
ActiveDocument.GetGroup("CyclicGroup1").SetProperties gp
ActiveDocument.GetApplication.Refresh
End Sub

When I run this macro in the client there is no problem but when I run it in the browser then I get the error message:

Macro parse failed. Functionality was lost
DynamicGroup
Error: Object needed 'gr'

I'm running QlikView 9 SR7.

Can anyone help me with this?

Regards

25 Replies
Not applicable
Author

Do you have section access? in my case i noticed that macros return that error when I use user login. As admin it works fine.

Anyone knows any option which must be "unticked" ? 🙂

Miguel_Angel_Baeyens

Hi,

Does that work when you access via client? All users are granted USER access even if stated otherwise in section access code.

Regards.

Not applicable
Author

It works on the server when I open document as an user in qlikview but doesnt work with IE plugin - i've tried both browsers - on server and client.

Not applicable
Author

Hi AndreBer,

I am having a problem which is very similar to your post question.

In your Macro code instead of entering the fields by manually, i need to get the fields which are selected in listbox that fields should be save into group.

See below your code in that place i need to have currently selected fields as group.

gr.AddField "Field1"

gr.AddField "Field2"

dim x(2)

set gp = ActiveDocument.GetGroup("CyclicGroup1").GetProperties

x(1) = "FIELD1"

x(2) = "FIELD2"

gp.Labels = x

gp.IsCyclic = true

Pls send me with attachement how it can be worked.

Thnks in advance

Not applicable
Author

Hi AndreBer,

I am having a problem which is very similar to your post question.

In your Macro code instead of entering the fields by manually, i need to get the fields which are selected in listbox that fields should be save into group.

See below your code in that place i need to have currently selected fields as group.

gr.AddField "Field1"

gr.AddField "Field2"

dim x(2)

set gp = ActiveDocument.GetGroup("CyclicGroup1").GetProperties

x(1) = "FIELD1"

x(2) = "FIELD2"

gp.Labels = x

gp.IsCyclic = true

Pls send me with attachement how it can be worked.

Thnks in advance

patrickanderson
Partner - Contributor III
Partner - Contributor III

ANY NEWS ON THIS? WHAT IS THE SOLUTION??

I have a Qlikview that works fine if I open it from the on the server itself, but if i go in through the client I get "Allocated Memory Exceeded" Error. and the server disconnects.

I have deleted all the macros that used to run on this QVW, but still ahve the error.

ANy suggestions?