Home | SkillForge Blog | Using Specified-Order Grouping in Crystal Reports

Using Specified-Order Grouping in Crystal Reports

Business Objects, Crystal Reports, SAP Crystal Reports

As we get into some of the more subtle ways to use grouping in Crystal Reports, we sometimes find that either groups of groups, or arranging them in a hierarchy, can improve the usefulness of the report. One key to a good report is to organize it so as to make it easier to understand, and therefore more useful. This is even more important now, with the size of the batches of data we work with now.

A good example would be customer sales “levels”—gold, silver, etc. based on how much a customer spent with a company.

Basic Report

We can start by creating a report with the necessary data, in this case the company name, country, and sales amount. (In a real-world situation, one would include whatever data the grouping should be based on.)

Insert Grouping

Then, we can insert a group (Insert–>Group), but we use the In Specified Order capability to create arbitrary-but-logical groups based on (in this case) sales amounts. This is where we can customize, using any reasonable criterion we want. The example here is sales levels, but any data from the database will work. It can even be categories of items sold rather than quantities, just so long as we know which is which.

Set Up Group Names

We set up names for these using the Named Group box. Also, limits (in this case monetary) in the Define Named Group box which pops up for the purpose.

Other Customers

We also need to set up a space for customers which don’t fall into one of the three “main” groups. (“Occasional”, “Other”, etc., are fine.)

Grouped Report

We rearrange the labeling a little for convenience, and maybe sort the customers by name. Then we’ve got a decent grouping set up. One thing which helps is to get a good idea of the final layout or structure in advance. It’s a lot easier if you know where you’re going, and you have a decent map.

To learn more, take a look at our Crystal Reports classes.