Skip to Content
Author's profile photo Former Member

Custom Groups with Custom Sorted Values in Crystal Reports 2011

Step by step process for creating Custom Groups with a specified order of values using Crystal Reports 2011

1. Go to ‘Group Expert’ window from “Report” menu in the crystal report or through the direct shortcut available in the toolbar as shown in the image 1.

2. After opening the ‘Group Expert’ window, drag the required field for grouping from ‘Available Fields:’ pane to ‘Group By:’ pane. Now the group is created. Here by default values will be displayed in ascending order.

3. In Group Expert window itself, to the bottom of ‘Group By:’ pane there is a options button. By clicking on that button a new window ‘Change Group Options’ is opened, where Grouped Field is shown and sorted order is selected by default. In the drop down of the sorted order button there are 4 options i.e.,

                   a) in ascending order

                   b) in descending order

                   c) in specified order

                   d) in original order

As we know about ascending order(A-Z) and descending order(Z-A) already, original order is the order of values in the filed as it is in the database.

‘Specified order’ is the custom order that will be explained below.

Specified order:

1. If we select ‘in specified order’ option from ‘Change Group Options’ window, a new tab will be opened inside the same window in which we need to select new button at the bottom to create a new group on top of the selected field.

2. By clicking on new button, a new small window will be opened ‘Define Named Group’. In this you need to specify the group name, select the value criteria in the left side drop down, for example..’is any value’, ‘is equal to’, ‘is not equal to’ etc and select the corresponding values to be grouped into that group name. Click on ok button, now the 1st group is created.

3. The current ‘Define Named Group’ window is closed and create 2nd group and then 3rd and so on as required using the same ‘Change Group Options’ window as in the above step.

4. We can change the order of any group after creating all also by selecting the group name in the list and clicking on up and down arrows on the right side.

5. The other values of the grouped field which are not given in any of the created groups will be automatically created as “Others” group. We can also discard these other values by selecting “discard all others” option in ‘options tab’ of ‘Change Group Options’.

6. You can find all the above mentioned window names in the attached Image 1. Also find the final output of the report after grouping and sorting in the attached Image 2.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Abhilash Kumar
      Abhilash Kumar

      Thanks for posting, Nirupa.


      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thank You Abhilash.

      Author's profile photo Former Member
      Former Member

      How to create Custom Groups with a specified order of values using Crystal Reports programmatically? Another question is, If I need to localize the values in specified order how to do it?

      Author's profile photo Ludek Uher
      Ludek Uher

      Please post your query as a Discussion

      - Ludek

      Senior Support Engineer AGS Product Support, Global Support Center Canada