Group statistics are not required if you use a crystal report. However, after grouping, we find that the value of the grouping field is not as good as we think, and is displayed in the center according to the value of a single field.
The following steps enable the grouping field to appear only once in a column and be centered.
Step 1: Add a runtime total field. Each attribute is set as follows:
1. Summary field: columns to be grouped
2. Summary type: Count
3. Evaluate: For each record
4. Reset (when the group is changed): select a group.
Purpose: Count the total number of rows in this group.
Step 2: add a second field to count in this group
1. Right-click the attributes of the field next to the group field and select insert and summary.
2. Select the summary field: The selected field
3. Calculate the summary: Count
4. Summary location: select a group
Purpose: calculate the total number of records in the group.
Step 3: Set the formula field for displaying the suppression of grouping Fields
1. Suppress display: Selected
2. Open the formula:
If {# rtotal0} (total field during the first step) = int (count (...) (count in the second step)/2 + 1) then
False
Else
True
Purpose: if the number of the current record is 1/2 of the number of records in the group, the display will not be restrained; otherwise, a single field will be displayed near the middle position of the record in the group.