>>scan
>> val = val+value calculated by formula
>>endscan
>>
>>replace myField with val (where myField is N(9,2))
>>
>>now I'm using
>>
>>scan
>> if category = 1
>> val1 = val1 + value calculated by formula
>> endif
>> if category = 2
>> val2 = val2 + value calculated by formula
>> endif
>>endscan
>>
>>replace Val1Field with val1, ... where the fields are of currency type.
>>
>>Now, the sum of va1+val2+... should be equal val
>>
>>It doesn't work for me.
>
>Naomi,
>try
>
>STORE 0 TO val
>scan
> val = val+ROUND(value calculated by formula,2)
>endscan
>
>
>STORE 0 to val1,Val2
>
>scan
> if category = 1
> val1 = val1 + ROUND(value calculated by formula,2)
> endif
>
> if category = 2
> val2 = val2 + ROUND(value calculated by formula,2)
> endif
>endscan
>
>
>m.Val1 + m.val2 must by equal of m.val
>HTH
I'll try, though for the first I have no control, it's already pre-calculated.
If it's not broken, fix it until it is.
My Blog