Thank you that worked for the totaling, now I am trying to do the same thing now but counting instead of adding and I did the formulas like this:
//{@reset} for the page header:
whileprintingrecords;
numbervar y := 0
//{@accum} for the detail section:
whileprintingrecords;
numbervar y := y + count({table.amt});// or 1
//{@display} for the page footer:
whileprintingrecords;
numbervar y;
But it is not reseting, and the table.amt is a string. Thanks!