Hi,
You can use sum() function in foxpro to accomplish
In this example you are adding the values in column in_stock and on_order for
all the records and saving into two variables respectively.
ex:
SUM in_stock, on_order
TO gnInStock, gnOnOrder
* Printing to the screen the calculated values in the variables
CLEAR
?
? 'Total in stock : ', gnInStock && Displays 3119.00
? 'Total on order: ', gnOnOrder && Displays 780.00