Operation Manual
Running Totals
Creating running totals
11
Crystal Reports User’s Guide 207
7. Select sum from the Type of summary list.
8. In the Evaluate section of the dialog box, click For each record.
9. In the Reset section of the dialog box, click On change of group and
accept the default group name.
10. Click OK to save the running total field.
You return to the Field Explorer dialog box.
11. Place the running total field in the Details section of your report, just to
the right of the {orders.ORDER AMOUNT} field.
Note: If you want to view a grand total of each group, place the running
total field in the Group Footer section of your report.
Creating conditional running totals
There may be times when you have a list of values, and you only want to
subtotal some of the values in the list. For example:
• You have a list that contains both Canadian and U.S. customers.
• You want to keep customer records sorted alphabetically based on
customer name.
• You do not want to break the data into groups based on the country.
• You want a total of the values from just the Canadian records.
• You also want a total of the values from just the U.S. records.
To accomplish this, create two running totals, one to keep a running total of
the U.S. records, and one to keep a running total of the Canadian records.
• USTotal
maintains a running total of the U.S. records
• CanadaTotal
maintains a running total of the Canadian records.
u
To create a conditional running total
1. To get started, create a report using the sample data, Xtreme.mdb. Place
the following fields from left to right in the Details section:
{customer.CUSTOMER NAME}
{customer.COUNTRY}
{customer.LAST YEAR'S SALES}
2. On the Report menu, click Record Sort Expert.
Tip: Another way to do this is to click the Record Sort Expert button on
the Expert Tools toolbar.