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

Age Grouping

Status
Not open for further replies.

TaTips

Programmer
Oct 29, 2003
25
GB
hi:

I need to create groups in my report based on Age..

For example.. 30 - 50 and 60 - 70

The column is a number column.

Any examples of how to create these groups please ?

Thanks.
Tatips.
 
NOTE:

The columnm is CUSTOMER_AGE. eg.30 No DOB arithmetic is required just how to group according to a number column.

Ta.
 
If you want to create typical Crystal groups, simply create a group on your age field and then in the order box pick "specific grouping". This will allow you to create groups in the way you want.

Or you could create a formula field using the following syntax:

select {table.age_field}
case 0 to 10 : 1
case 11 to 20 : 2
case 21 to 35 : 3
case 36 to 70 : 4
default : 5

Note: you must include a default line. The results on the right side of the colons can be text. Just include the text inside quotes.

Howard Hammerman,
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
You can also do this directly in grouping in the "specified order" section, that also makes getting them in the proper order easy.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top