// Sets a filter to display only sales quantities greater than 20. MyQuery.SETFILTER(Quantity, '>20'); // Runs the query. MyQuery.OPEN; // Reads each row in the dataset and displays message with column values. // Stops reading when there are no more rows remaining in the dataset (READ is FALSE). WHILE MyQuery.READ DO BEGIN MESSAGE(Text000, MyQuery.Name, MyQuery.Quantity); END; // Closes the query. MyQuery.CLOSE;
Answers
I think you want to sum all amounts? You need a loop for that. In the example WHILE .. DO.
Good luck, let us know how it works out for you!