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

How to suppress groups that contain certain criteria 1

Status
Not open for further replies.

jimger

Technical User
Jan 20, 2005
10
US
I'm using Crystal XI, and am fairly new to Crystal Reports.
My report is grouped by case number. Some cases contain both adults and children, and some only adults. My data fields are:
Case Number, person ID number, Date of Birth.

I want to suppress any group (case number)that contains a person under 18, leaving only the groups that contain only persons over 18. I've tried a conditional suppression formula in the group header (Date of Birth < 9/1/1988, for example). That does show me only the adults in the groups, but does not eliminate the groups that contain adults and children.
What can I do?
 
Try a suppression formula of:

datediff("yyyy",currentdate,minimum({table.date},{table.group})) < 18

-k
 
I think you really want a formula like:

if datediff("yyyy",currentdate,minimum({table.date},{table.group})) < 18 then 1 else 0

Then create a group sum of that formula.

Then add a group selection formula to select groups where the sum is = 0. Then any group with 1 or more people under 18 will be suppressed.


Rob at Plan-Be
 
Rob -
Works just fine - thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top