Subject | Calculated field to get SUM(SOME_FLOAT_FIELD) |
---|---|
Author | hugosan@redysoft.com |
Post date | 2001-09-17T18:22:03Z |
I have a Master-Detail relation, with an Order-Header and multiple
Order-Item. The user makes the inserts in a Detail-Grid, and I use
an Order-Item.CalculatedField to maintain and show the total amount
by accumulating a global variable at OnCalcFields event.
The problem is when there are more rows than the Grid can show: the
other rows fire the OnCalcFields event only if the user requests them,
and my total_amount is not real unlike the user scrolls all the grid
up and down...
Is there any way to force the Calculate for all the Dataset?
Any other approach? I could make a Query for only SELECT SUM(..) FROM
DETAIL, but I think that's too much traffic with the server.
Thanks in advance,
Hugo.
Order-Item. The user makes the inserts in a Detail-Grid, and I use
an Order-Item.CalculatedField to maintain and show the total amount
by accumulating a global variable at OnCalcFields event.
The problem is when there are more rows than the Grid can show: the
other rows fire the OnCalcFields event only if the user requests them,
and my total_amount is not real unlike the user scrolls all the grid
up and down...
Is there any way to force the Calculate for all the Dataset?
Any other approach? I could make a Query for only SELECT SUM(..) FROM
DETAIL, but I think that's too much traffic with the server.
Thanks in advance,
Hugo.