Crystal Reports for Eclipse Designer Guide

To create a reset formula to set a variable to zero

  1. In the "Field Explorer" view, right-click {CUSTOMER.CUSTOMER_NAME} and click Group on Field.
  2. Right-click Formulas, and click New.
  3. In the "Properties" view, in the Name box, type "AmountReset".
  4. In the "Field Explorer" view, double-click AmountReset.
    The Record Filter on the Formulas tab appears.
  5. 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.
  6. Save the report.
  7. 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.
  8. In the Layout page, right-click AmountReset and click Conditional Formulas.
  9. In the Conditional Formulas for AmountReset dialog box, click Suppress so that it will not appear in the final print-out, and click OK.
  10. On the Formulas tab, under Suppress enter {@AmountReset} = {@AmountReset}.



SAP BusinessObjects
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Product Documentation on the Web
http://help.sap.com/