How to center field values in Crystal Report Group statistics

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.