Using CR9
I am creating a formula to calculate an amount based on an aging category within a group. Each time the group changes I want to reset the calculation variable to zero so we can start at zero again with the next group.
Here is the structure
GH1
Detail
GF1
In the report I am displaying the value of InsTot90 in the detail section to insure the formula is calculating correctly, this works. However, when I try to display the final value for this group variable in the GF I get a huge number that is not even close to the number calculated in the detail section of the report. This number does not change regardless of where I place the formula, it’s as if the value of this variable is being set somewhere and is not even being reset to zero in the next GH1 where I thought I was forcing the variable InsTot90 to reset to zero.
Any clues as to what I am doing wrong?
I am creating a formula to calculate an amount based on an aging category within a group. Each time the group changes I want to reset the calculation variable to zero so we can start at zero again with the next group.
Here is the structure
GH1
Code:
Global numberVar InsTot90 := 0;
Code:
numberVar InsTot90;
if {DATA12.DATE} = Over90Days then
insTot90 := InsTot90 + {DATA11.BALANCE};
Code:
WhilePrintingRecords;
numberVar InsTot90;
In the report I am displaying the value of InsTot90 in the detail section to insure the formula is calculating correctly, this works. However, when I try to display the final value for this group variable in the GF I get a huge number that is not even close to the number calculated in the detail section of the report. This number does not change regardless of where I place the formula, it’s as if the value of this variable is being set somewhere and is not even being reset to zero in the next GH1 where I thought I was forcing the variable InsTot90 to reset to zero.
Any clues as to what I am doing wrong?