Skip to main content
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


Miguel Angel Baeyens wrote:
EDIT: The group is actually removed, then created, but fields are not added to that group, even using one dimension. <div></div>


I found the same but I have just made another finding. The macro is not even working when the QlikView document is opened with the full client but not opened directly instead using the function "open on server".

Is it possible that this kind of macro is not meant to be working when opening the document as a "normal" user on the server?

And if yes is there another possibility to create dynamic cyclic without using macros?

Regards

Miguel_Angel_Baeyens

I'm using version 10 by the way, so even if it's not a bug, it's worth a note to the Support guys.

Anyway, my guess is that, what a group is at the end is one field. I doesn't make any sense if you cannot access to the script or macro editor, but you can create a field/dimension. I'll give a couple of additional tests just in case.

Regards.

Not applicable
Author


Miguel Angel Baeyens wrote:
Anyway, my guess is that, what a group is at the end is one field. I doesn't make any sense if you cannot access to the script or macro editor, but you can create a field/dimension. I'll give a couple of additional tests just in case. <div></div>


I agree with that but the sense of the macro is that cyclic group gets a dynamic which is from my knowledge only possible with the use of a macro.

Therefore I would say that it should be working because otherwise there would be no possibility.

Looking forward to the results of your tests.

Regards

EDIT: Just an additional note. If a "normal" user should not access the fields through the macro then the macro should not be executed in any way. Because right now the group is deleted an recreated but the rest is not working. So this is the worst constellation.

Miguel_Angel_Baeyens


AndreBer wrote:EDIT: Just an additional note. If a "normal" user should not access the fields through the macro then the macro should not be executed in any way. Because right now the group is deleted an recreated but the rest is not working. So this is the worst constellation.


Agree. If the macro removes the group and creates it, it should work or not, but completely. Let the rest of coders here and VB gurus take a look at our code and see what they say.

Not applicable
Author

Hi,

we have the same problem with the ActiveDocument.CreateGroup command when it's executed within a macro on a server. Did you already asked the QlikView support?

Thomas

Not applicable
Author

Hi i havent asked aupport as i was hoping this would help me resolve it ASAP.

Not applicable
Author


thomas.peter wrote:
we have the same problem with the ActiveDocument.CreateGroup command when it's executed within a macro on a server. Did you already asked the QlikView support?<div></div>


We forwarded this issue to the company from which we bought QlikView and they have forwarded it to the Qliktech support because the reproduce it, too.

So hopefully we will get an answer within the next few days.

Regards

Not applicable
Author

Hi,

any news or reply from the QlikView Support?

Regards
Thomas

Not applicable
Author

Unfortunately not so far.

Regards

Not applicable
Author

Hi,

short update from my side. I have now received an answer from QlikTech Support telling me, that the function ActiveDocument.CreateGroup is not supported on Server/Publisher ;-(

Thomas