Creating running totals using a formula – HP Intelligent Management Center Standard Software Platform User Manual

Page 268

Advertising
background image

2.

On the Insert Tools toolbar, click Insert Group and create a group

based on the Customer.Customer Name field.

3.

Right-click the Customer.Last Year's Sales field and select Summary
from the Insert submenu.

4.

Choose Group #1: Customer.Customer Name - A as the location for
your summary.

If you look at the subtotals for each group, you will notice they aren't
accurate. This is because the Customer.Last Year's Sales field is
duplicated for each order in the report. Follow the rest of this procedure
to see how a running total produces an accurate result in the same
situation.

5.

In the Field Explorer dialog box, select Running Total Fields and

click New.

The Create Running Total Field dialog box appears.

6.

Enter the name "LYSrunning" in the Running Total Name box.

7.

Highlight Customer.Last Year's Sales in the Available Tables and Fields
box, and use the first arrow button to move it over to the Field to
summarize
box.

8.

Select sum from the Type of Summary list.

9.

In the Evaluate section of the dialog box, click On change of field and
add the Customer.Customer Name field from the Available Tables and
Fields
box.

10.

In the Reset section of the dialog box, click On change of group and
choose Group #1: Customer.Customer Name - A.

11.

Click OK to save the Running Total field.

12.

Place the running total in the Group Footer section.

Compare the running total amount with the subtotal amount for each group.
You will see the running total is accurate while the subtotal is not.

Creating running totals using a formula

If you have suppressed data, or your data is based on a formula that occurs
WhilePrintingRecords, you should create a running total formula rather than
using the Create Running Total Field dialog box.

268

Crystal Reports 2008 SP3 User's Guide

Running Totals

11

Creating running totals using a formula

Advertising