Operation Manual
Running Totals
Creating running totals
11
206 Crystal Reports User’s Guide
8. In the Reset section of the dialog box, click Never (this gives you a
running total that never resets; that is, the running total continues
throughout the report).
9. Click OK to save the running total field.
The program returns you to the Field Explorer dialog box.
10. Insert the running total field in the Details section of the report, just to the
right of {orders.ORDER AMOUNT}.
On your report, each row in the running total column displays the current
record value added to the previous values. This total continues,
unbroken, through the report.
Creating running totals for a group
Another common use for running totals is tallying items in a group. The
running total starts with the first item in the group and ends with the last. Then
it starts all over again for the next group, then the next, and so on.
In this tutorial, you will create a report that:
• Maintains a running total of customer orders.
• Groups customer orders and resets the running total for each group.
• Displays the subtotal for each customer group.
u
To create a running total for a group
1. To get started, create a report using the sample data, Xtreme.mdb.
Link the Customers and Orders tables and place the following fields from
left to right in the Details section:
{customer.CUSTOMER NAME}
{orders.ORDER ID}
{orders.ORDER AMOUNT}
2. On the Insert menu, click Group and group on the
{customer.CUSTOMER NAME} field.
3. On the View menu, click Field Explorer.
The Field Explorer dialog box appears.
4. Select Running Total Fields and click New.
The Create Running Total Field dialog box appears.
5. Enter the name “GroupRunningTotal” in the Running Total Name box.
6. 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.