×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

# Contact US

Log In

#### Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
To Your Posts
• Keyword Search
• One-Click Access To Your
Favorite Forums
• Automated Signatures
On Your Posts
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

# Crystal Reports - Group question

 Forum Search FAQs Links MVPs

## Crystal Reports - Group question

(OP)
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

### RE: Crystal Reports - Group question

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:
1. Juvenile/Adult is in a field I called Type. Please add your Table/Column name as appropriate
2. The only data in that field is limited to "Adult" or "Juvenile", ie the 'maximum' value in that field is "Juvenile"
Hope this helps.

Regards,
Pete

### RE: Crystal Reports - Group question

(OP)
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

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

### Reply To This Thread

#### Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!

Already a member? Close this window and log in.