basic variable formulas:
reset:
shared numbervar aVar := 0;
"" // hides the 0 display
increment
shared numbervar aVar := aVar + {table.field};
""//optional, you may want to see this in a detail record
could be: (this will take a value from a subreport add it to the accumulator and display the subreprot value.
shared number aSubReport;
shared numbervar aVar := aVar + aSubReport;
aSubReport
display
shared numbervar aVar
:= is assignment, = is equality testing, ; needed at the end of all lines except the last.
HTH