1. Create a formula to reset the value of the variable:

    WhilePrintingRecords;
    Shared NumberVar EndingBalance;
    EndingBalance := 0;

  • Place this formula in the group header (where the formula will need to reset its value back to zero for the next group)

  • Create a formula to calculate the value of the variable:

    WhilePrintingRecords;
    Shared NumberVar EndingBalance;
    EndingBalance := EndingBalance + {@formula with running total}

  • Place this formula in the section where the {@formula with running total} is located

  • Create a formula to display the value of the variable after it has finished calculating:

    WhilePrintingRecords;
    Shared NumberVar EndingBalance;
    EndingBalance

  • Place this formula in the section where you would like to see the total (typically the Group Footer section if you are summing values per group)