- From the Field Explorer dialog box, place the following fields from left to right in the Details section of your report:
{customer.CUSTOMER NAME}
{customer.LAST YEAR'S SALES}
{orders.ORDER ID}
{orders.ORDER AMOUNT}
-
On the Insert Tools toolbar, click Insert Group and create a group based on the Customer.Customer Name field.
- Right-click the Customer.Last Year's Sales field and select Summary from the Insert submenu.
- 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.
-
In the Field Explorer dialog box, select Running Total Fields and click New.
The Create Running Total Field dialog box appears.
- Enter the name "LYSrunning" in the Running Total Name box.
- 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.
- Select sum from the Type of Summary list.
- 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.
- In the Reset section of the dialog box, click On change of group and choose Group #1: Customer.Customer Name - A.
- Click OK to save the Running Total field.
- 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.