Operation Manual
Running Totals
Creating running totals
11
Crystal Reports User’s Guide 205
Creating running totals
Creating running totals in a list
Running totals are totals that can be displayed on a record by record basis.
They total all records (in the report, in the group, and so on) up to and
including the current record.
The most basic form of a running total is a running total maintained
throughout a list. In this tutorial, you will create this kind of report by setting up
a running total for a list of order amounts.
Note: Running total fields are prefixed by the # sign.
u
To create a running total in a list
1. To get started, create a report using the sample database, Xtreme.mdb.
Link the Customer and Orders tables, and then place the following fields
from left to right in the Details section:
{customer.CUSTOMER NAME}
{orders.ORDER ID}
{orders.ORDER AMOUNT}
2. On the View menu, click Field Explorer.
The Field Explorer dialog box appears.
3. Select Running Total Fields and click New.
The Create Running Total Field dialog box appears.
4. Enter the name “TotalOrders” in the Running Total Name box.
5. Highlight {orders.ORDER AMOUNT} in the Available Tables and Fields
box, and use the first arrow button to move it over to the Field to
summarize box.
6. Select sum from the Type of summary list.
7. In the Evaluate section of the dialog box, click On change of field, and
select {orders.ORDER ID} as the On change of field.
The running total will execute each time this field changes.
Details All records up to and including the current record
Group Footer All records up to and including the last record in the current
group
Page Footer All records up to and including the last record on the current
page
Report Footer All records in the report