I have a container object with several columns and I need to sum the values of one column for displaying the sum in
a field outside the container, each time a record is entered.
ok = VRMethod( "QRY_AVR", "MoveFirst" )
do while( ok = 1 )
call VRMethod "QRY_AVR", "RowData", "data."
str = ""
do i = 1 to data.0
str = str data.i
end
say str
ok = VRMethod( "QRY_AVR", "MoveNext" )
end
With 2 records the output of say is (from data.1 incl. data.7):
555 1230 1111 TEST1 1.0 10500 35880
555 1230 8951 TEST2 1.0 -3456 -8951
The last column, data.7, contains the numbers I need the sum of.
Now the problem is how to make the sum of data.7 and make it available for displaying in a field.
Ideas are welcome and appreciated.