Subject Aggregate functions of a Live TIB_Grid?
Author Hug
I have a TIB_Grid for insert and update records, and I would show on the same form a virtual, calculated field (read-only, as a simple Label), that accumulates the total amount of all records.
For example:
TABLE SALES (
ID SMALLINT (with generator) PRIMARY KEY
,ITEM_ID SMALLINT
,QUANTITY DOUBLE PRECISION
,PRIZE DOUBLE PRECISION)

It's to say, I need something like
SELECT SUM(QUANTITY*PRIZE)
FROM SALES,
and everytime table SALES changes, it calculates again; but I think it's no good using another TIB_Query for this total_amount, because following reasons:
- the records I insert at this "session" don't exist on the server until I commit transaction or close my application.
- I guess this solution makes bad performance, because there is two open ways working with the same data.

So, is there some feature that allows operating with aggregate functions over a "buffered dataset" which is entirely on the client side?
Thanks in advance, and excuse for my potatenglish!
Hugo.


[Non-text portions of this message have been removed]