Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incrementing Report Variable on change of Group
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00638191
Message ID:
00638526
Views:
22
Cathy,

I had tried this approach (except I was just putting the setvar() in a field in the group header) and was failing because I was not checking the sum box. The nGroups was always evaluating to zero. I think the expression for nGroups needs to be changed, see below.

Thanks for sharing...I'll have to scratch my head on this one :)


>There are several ways to skin a "Fox" .. so here's another way to accomplish this task:
>
>Create one report variable, nGroups, value to zero is "0", and mark it as SUM, reset at End of Report. By now you're saying .. this is stupid .. I'm summing nothing and will end up with nothing! Here's the trick .. in the Group Footer On Exit expression, enter this:
>
>
>_VFP.SetVar('nGroups', nGroups + 1)
>
>
>This will increment the variable at the end of each group .. and because you have it SUMMING 0, the native summing won't skew the variable.
>
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform