Crystal Reports - Groups


Advertisements

In this chapter, we will cover how to define, render and delete groups.

Define Groups

When you need to separate the data into groups in order to make it easily understood, grouping option can be used.

You can also customize grouping for a single value or multiple values by using the customize option inside the grouping tab.

To apply grouping in the report, go to structure tab of the report → Data → Groups

Data Groups

Render Groups

To add a grouping condition. Click on New (‘+’ sign) and select the attribute on which you want to apply grouping. If you apply regular grouping on one object, it will group all the similar values in a report.

Render Groups

To apply grouping on single value, go to customize grouping option → New → Add Condition → select operator and value from the dropdown list as shown in the following image −

Add Condition

It also gives an option to discard everything else, group everything else in single group with group name or include everything else without changing the group name.

In the following example, it has created 2 groups: first with Region Name=”New Delhi” and second group with everything else with group name “Others”.

Groups

When you use grouping in a report, two new sections appear in the report canvas − Group Header 1 and Group Footer 1.

Delete Groups

To delete a group, select the group you want to remove and click on the Delete option.

Go to Structure of the report → Groups → select groups #1, 2 you want to delete → Delete.

Delete Groups
Advertisements