Crystal Reports for Eclipse Designer Guide

To create a running total in a one-to-many linking relationship

  1. Create a report using the Customer and Orders tables from the Xtreme sample database.
  2. Select the CUSTOMER_NAME, and LAST_YEARS_SALES fields from the Customer table, and the Order ID and Order Amount fields from the Orders table, and place them in the Body section.
  3. In the "Field Explorer" view, select {CUSTOMER.CUSTOMER_NAME}, right-click on the field and click Group on Field.
  4. In the body of the report, right-click the {CUSTOMER.LAST_YEARS_SALES} field and select Summarize.
    The summary is inserted in the Group Footer.
    If you look at the subtotals for each group, you will notice they are inaccurate. This is because the {CUSTOMER.LAST_YEARS_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.
  5. In the "Field Explorer" view, right-click Running Totals, and click New.
  6. Select the new running total.
    The running total settings are displayed in the "Properties" view.
  7. In the "Properties" view, in the Name box, type the name "LYSrunning".
  8. From the Summarized Field list, select {CUSTOMER.LAST_YEARS_SALES}.
  9. From the Summary Operation list, select Sum.
  10. From the Evaluate Condition Type list, click On change of field.
  11. From the Evaluate Condition list, select CUSTOMER.CUSTOMER_NAME.
  12. From the Reset Condition Type list, click On Change of Group.
  13. From the Reset Condition list, select Group #1: CUSTOMER_NAME.
  14. 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.



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