Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reset an array counter on change of group

Status
Not open for further replies.

menuch

MIS
Jan 8, 2003
46
US
Is there any way of reseting an formula conataining an array on change of group to get the first record in each group in the Details section?
 
Make a variable to keep track of the value that you're grouping by and then act accordingly.


Shared stringvar groupValue;

if {GroupNameValue} <> groupValue then
//run code here

groupValue := {GroupNameValue};

//blah blah blah

There may be a more official way to do it but that should work.
 
you would have an array pointer that would be reset in the group header....but you don't want it reset in a repeated Group header (ie. group splits over 2 pages) so put this in the Group header

@IntializePointer (Suppressed in group header)

NumberVar Pointer;

if not inRepeatedGroupHeader then
Pointer := 1;


Use pointer then when you reference your array and incriment it as you normally would.

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top