To create a reset formula to set a
variable to zero
In the
"Field
Explorer" view, right-click {CUSTOMER.CUSTOMER_NAME} and click
Group on
Field.
Right-click
Formulas, and click
New.
In the
"Properties" view, in the
Name box, type "AmountReset".
In the
"Field
Explorer" view, double-click
AmountReset.
The Record Filter on the Formulas tab
appears.
On the Formulas tab, under
AmountReset, type the following formula:
WhilePrintingRecords;
CurrencyVar Amount := 0;
This formula sets the value in the
Amount variable to 0.
Save the report.
Place this formula in the
Group Header #1 section of your report.
Because the Group Header #1 section
appears once for every group, @AmountReset executes each time the group
changes. So, the Amount variable is reset to 0 each time a new group begins.
In the Layout page,
right-click
AmountReset and click
Conditional
Formulas.
In the
Conditional
Formulas for AmountReset
dialog box, click
Suppress so that it will not appear in the final
print-out, and click
OK.
On the Formulas tab, under
Suppress enter {@AmountReset} = {@AmountReset}.