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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - Group question 1

Status
Not open for further replies.

SarahSCPDAdmin

Technical User
Aug 10, 2023
7
US
I am trying to create a report and I'm stuck.

I have my data grouped by Complaint Number and under each complaint number is last name, first name, age, etc.

I then created a formula to tell me if each person is a Juvenile or Adult.

For instance:

Case# 1234 involves:

Name A = Juvenile
Name B = Juvenile
Name C = Adult

Case #4567 involves:

Name D = Adult
Name E = Adult
Name F = Adult

Case #8910 involves:

Name G = Juvenile
Name H = Juvenile
Name I = Juvenile

I ONLY want to show the groups that have a juvenile involved.

I can figure out how to narrow it down to only show case numbers with juveniles involved (for example for case 1234 it would show me Name A and Name B but not Name C and for Case 8910 it would show me all names) but if there are adults involved in that case, like Case 1234, it will not show me Name C.

I hope I'm explaining this well. But I'm super frustrated. Does anyone have any insight for me?

Thanks so much!

Sarah
 
Not absolutely sure what the end result needs to look like but the following formula will return just the Groups that have at least 1 'Juvenile' listed.

Go to the Group Selection Formula (Report ==> Selection Formula ==> Group) and enter the following formula:

Code:
MAXIMUM({Table.Type}, {Table.CASE_No}) = 'Juvenile'

This approach relies on a couple of assumptions:
[ol 1]
[li]Juvenile/Adult is in a field I called Type. Please add your Table/Column name as appropriate[/li]
[li]The only data in that field is limited to "Adult" or "Juvenile", ie the 'maximum' value in that field is "Juvenile"[/li]
[/ol]

Hope this helps.

Regards,
Pete
 
You, Sir PMAX9999, are my hero! In all of my looking around online trying to figure this out I have not come across this way of doing it.

Thank you, thank you, THANK YOU!!

Sarah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top