This is one of those things I've spent to much time on and still can't solve, so here goes:
I have an age field, calculated using this formula:
I have 3 groups, the last one is the age.
The age is broken out into 5 categories (but not grouped by these categories) with a different formula:
As you can see from above I'm attempting a manual running total and that does work, but I don't know how to reset it on group change (for group totals). And that is the problem. I need to reset this thing on group change, or have a second total for just the group. help!
I have an age field, calculated using this formula:
Code:
WhileReadingRecords;
DateTimeVar Birth := {Abha7105_93005.MceHdr_BirthDate};
DateVar CurDate := CurrentDate;
If (Month(CurDate)*100) + Day(CurDate) >= (Month(Birth)*100) + Day(Birth)
Then Year(CurDate) - Year(Birth)
Else Year(CurDate) - Year(Birth)-1
I have 3 groups, the last one is the age.
The age is broken out into 5 categories (but not grouped by these categories) with a different formula:
Code:
shared numbervar ageGroup0;
shared numbervar ageGroup18;
shared numbervar ageGroup30;
shared numbervar ageGroup45;
shared numbervar ageGroup65;
whileprintingrecords;
Select {@Age}
Case 0 to 17 :
ageGroup0 := ageGroup0 + 1
Case 18 to 29 :
ageGroup18 := ageGroup18 + 1
Case 30 to 44 :
ageGroup30 := ageGroup30 + 1
Case 45 to 64 :
ageGroup45 := ageGroup45 + 1
Case 65 to 999 :
ageGroup65 := ageGroup65 + 1
As you can see from above I'm attempting a manual running total and that does work, but I don't know how to reset it on group change (for group totals). And that is the problem. I need to reset this thing on group change, or have a second total for just the group. help!