Crystal Reports for Rational Application Developer Designer Guide
To group data by the first letter of
a customer name
Create a report using the
Customer table from the Xtreme sample database.
Select the
CUSTOMER_NAME,
Region,
Postal
Code, and
Country fields from the Customer table, and move them to
the Body section of the report.
In the
"Field
Explorer" view, right-click
Formulas, and click
New.
Under
Formulas, double-click
My
Formula.
The Formula Editor appears.
In the
Formula
Editor
type the following formula:
{CUSTOMER.CUSTOMER_NAME}[1]
In the
"Field
Explorer" view, right-click
My
Formula and click
Group on
Field.
The data for your report is grouped
by the formula field as specified. The data is broken into groups based on the
first letter of the customer's name. The formula provides a live header for
every group.
For more information about live
headers, see
Live headers.