Thanks again.
>>Thanks Dragan,
>>
>>the problem I had with recalculating every time was that the network was a pretty slow wireless one and things were really dragging sending stuff over the network. I'm not a network person so couldn't tell if the network setup was the problem or not.
>
>The trick in it is to pull minimal amount of data - just the transactions for a given item/customer/account/whatever, and not all fields, just those needed for the calculation. Then when that cursor is totalled, one record gets written and the cursor discarded. That minimizes the network traffic.