Hi
I have been experimenting with creating my own Counter variables having read an interesting thread by 'Catadmin'. I am trying to create a counter that will return the Group Number.
So far I declared a Shared Counter variable and have written 3 functions, one that increments the Counter, one that displays the Counter and one that resets it to 0. This code has been added under the Code tab under Report Properties
What the problem is
If I create a simple report with a region (table in this case) grouped on the field CITY I find that if I call the increment function in the group header and the display function in the group header I get a group number for each group. Hurrah!
Unfortunately though, when I try to reference the Counter variable.. lets say in an IIF expression ie
[blue] IIF (Counter = 1, TRUE, FALSE) [/blue] I get a message stating that the variable Counter is undeclared-- even though I have declared it as a shared variable.
How do I get around this? I want to reference the Counter variable so that I can set the visibility of a group row depending on the group number.
Its frustrating as I had thought I was getting to the bottom of this!
Nassy
I have been experimenting with creating my own Counter variables having read an interesting thread by 'Catadmin'. I am trying to create a counter that will return the Group Number.
So far I declared a Shared Counter variable and have written 3 functions, one that increments the Counter, one that displays the Counter and one that resets it to 0. This code has been added under the Code tab under Report Properties
What the problem is
If I create a simple report with a region (table in this case) grouped on the field CITY I find that if I call the increment function in the group header and the display function in the group header I get a group number for each group. Hurrah!
Unfortunately though, when I try to reference the Counter variable.. lets say in an IIF expression ie
[blue] IIF (Counter = 1, TRUE, FALSE) [/blue] I get a message stating that the variable Counter is undeclared-- even though I have declared it as a shared variable.
How do I get around this? I want to reference the Counter variable so that I can set the visibility of a group row depending on the group number.
Its frustrating as I had thought I was getting to the bottom of this!
Nassy