ColdPolarBear
IS-IT--Management
Need to have a field in a report display age group in a report i.e. 21-25 or 26-30. I need the age grouping to appear for each individual record in the report. I will then use the groupings to generate a bar graph in the same report. Please advise if teh code I am using is missing something or if ther is a better way to achive this result I would be interested.
IF {@AgeAtTimeOfComplaint}<20 Then "< than 20"
ELSE IF {@AgeAtTimeOfComplaint}Between 20 and 26 Then "21 - 25"
Else IF {@AgeAtTimeOfComplaint}Between 26 and 30 Then "26 - 30"
Else IF {@AgeAtTimeOfComplaint}Between 31 and 35 Then "31 - 35"
Else IF {@AgeAtTimeOfComplaint}Between 36 and 40 Then "36 - 40"
Else IF {@AgeAtTimeOfComplaint}Between 41 and 45 Then "41 - 45"
Else IF {@AgeAtTimeOfComplaint}Between 46 and 50 Then "46 - 50"
Else IF {@AgeAtTimeOfComplaint}Between 51 and 55 Then "51 - 55"
Else IF {@AgeAtTimeOfComplaint}Between 56 and 60 Then "61 - 65"
Else IF {@AgeAtTimeOfComplaint}> 65 Then "> than 64"
End IF
IF {@AgeAtTimeOfComplaint}<20 Then "< than 20"
ELSE IF {@AgeAtTimeOfComplaint}Between 20 and 26 Then "21 - 25"
Else IF {@AgeAtTimeOfComplaint}Between 26 and 30 Then "26 - 30"
Else IF {@AgeAtTimeOfComplaint}Between 31 and 35 Then "31 - 35"
Else IF {@AgeAtTimeOfComplaint}Between 36 and 40 Then "36 - 40"
Else IF {@AgeAtTimeOfComplaint}Between 41 and 45 Then "41 - 45"
Else IF {@AgeAtTimeOfComplaint}Between 46 and 50 Then "46 - 50"
Else IF {@AgeAtTimeOfComplaint}Between 51 and 55 Then "51 - 55"
Else IF {@AgeAtTimeOfComplaint}Between 56 and 60 Then "61 - 65"
Else IF {@AgeAtTimeOfComplaint}> 65 Then "> than 64"
End IF