I have a report that I need to sum up. The field I am summing is a field that is multiplying a percentage against a summed field.
EX:
1.25
.50
____
1.75 * 90% = 1.575
1.50
.85
____
2.35 * 40% = .94
I need to sum up 1.575 + .94 = 2.52
This is the formula I am using for my individual line totals called Comm Amt 2:
(
{@% paid of amt due}*Sum (
{@Comm Amt}, {CASH_RECEIPT_LINE.CHECK_ID}))/100
Next for the grand total (Comm Total) I have:
whileprintingrecords;
shared numbervar CommTotal;
CommTotal:= CommTotal
+{@Comm Amt 2};
CommTotal;
This works fine until the very last record. It adds it in again. Using the example above it would be:
1.575 + .94 + .94 = 3.455
I have a reset formula set up called: CommTotalReset:
whileprintingrecords;
shared numbervar CommTotal;
CommTotal=0;
CommTotal;
I have tried putting this at every level and it doesn't seem to make a difference.
How do I correct this? Any suggestions? I feel like I'm missing some small thing and just can't quite figure it out.
Thank you in advance for any help you can provide.