Home > Crystal Reports, Ripplestone > Crystal Reports Group Ranges with Specified Order feature

Crystal Reports Group Ranges with Specified Order feature

While working on a report for a Ripplestone client I was able to use the Crystal Report Specified Order option of the Group Expert.  I thought I’d share the process of using the Specified Order feature and how I used it to solve a problem that I was having with the report.

 

The report was a Crystal Report that would display a list of students for a class and needed to be grouped by the students age.  It was easy enough to group the age by using the Group Expert, but that creates a group for each age.  I needed to have the children grouped by a age range and not by the exact age of the children.

 GroupExpert

To create a range of ages I clicked on the Options button to open the Change Group Options and then selected “in specified order” from the group by options dropdown.

 ChangeGroupOptions_tab1

This activated the Specified Order tab on the dialog box.  On this tab I was able to type the group names in the combo box at the top and enter the 3 groups that I needed.  This created 3 empty groups, so the next step would be to assign values to each of the groups.  This would be the range of ages that I wanted for each of the three groups.

 ChangeGroupOptions_tab3

To create the age ranges for each of the 3 groups I clicked on the Edit button to open the Define Named Group dialog box and selected “is between” from the list of options.  Then needed to enter the values for the range of ages.  In the example below the report will groups all the children between the ages of 7 and 9 into the groups called “Ages 7-9”.

DefineNamedGroup

After running the records were grouped into the 3 age ranges with totals for each group.

ReportPreview

If you have questions or comments, please let me know.

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.