Using Running Totals



  1. Begin by opening the Room Capacity report.


    Click the Open button.

    Step 1
  2. Click the Room Capacity list item.

    Step 2
  3. Click the Open button.

    Step 3
  4. The Room Capacity report is displayed. You can access the Running Totals feature from the Field Explorer dialog box.


    Click the Field Explorer button.

    Step 4
  5. The Running Total Fields list displays the names of all the running total fields in your report. Currently, there are no running totals in the report. You can create a running total by selecting the Running Total Field option, and then clicking the New button.


    Click the Running Total Fields list item.

    Step 5
  6. Click the New button.

    Step 6
  7. Use the Create Running Total Field dialog box to specify the details for your running total. To add a new running total field, add a name, field to summarize, and the Evaluate and Reset criteria.

    Step 7
  8. First, specify a name for the running total.


    Enter the desired information into the Running Total Name field. Enter

     a valid value
     "Total Count"

    Step 8
  9. Next, define the field to be summarized. The report fields are not completely visible.


    Click the horizontal scrollbar.

    Step 9
  10. You want to calculate the totals for the ROOM_CAPACITY field.


    Click the ROOM_CAPACITY list item.

    Step 10
  11. Click the Add button.

    Step 11
  12. You use the Type of summary field to define the operation you want to perform. In this example, you want to calculate sum totals of the ROOM_CAPACITY field. Therefore, retain the default selection.

    Step 12
  13. You use the Evaluate section to define when the running total will execute. For this exercise, you want that the running total should be executed each time the ROOM field changes.


    Click the On change of field option.

    Step 13
  14. Click the ROOM list item.

    Step 14
  15. Add the ROOM field to the On change of field text box. This field will be the evaluation criteria.


    Click the Add button.

    Step 15
  16. The default selection Never in the Reset section indicates that you are running total that never resets, and continues throughout the report. Retain the default option for this exercise.

    Step 16
  17. Click the OK button.

    Step 17
  18. The Total Count field appears highlighted in the Running Totals Fields list. You need to add this field to the report. You insert running total fields by dragging them into the report, or by selecting them and then clicking Insert to Report button.

    Step 18
  19. Click the Insert to Report button.

    Step 19
  20. Click the Details section of the report to place the running totals field to the right of data fields.


    Click the Details cell.

    Step 20
  21. Notice that the Total Count field has been added to the report. Each running total field added to the report has a check mark added in front of its name in the Field Explorer.


    Running total fields are prefixed by the # sign on the report.


    Click the Close button.

    Step 21
  22. Next, view the results.


    Click the Refresh button.

    Step 22
  23. Notice that on the report, each row in the running total column displays the current record value added to the previous values. This total continues, unbroken, through the report.

    Step 23
  24. You need to scroll down to view all the running totals.


    Click the vertical scrollbar.

    Step 24

You have successfully calculated running totals for a field in a Crystal report.

Table of Contents  Start Topic