Page 1 of 1

problem with aggregate field

Posted: 07.02.2007, 17:35
by bedfordch
I've Delphi 6 enterprise French + Zeos 6.1.5

I've a TZQuery with this query "select * from mytable". This query returns many fields and I've to calculate the sum of 2 of them.

So I create a TAggregate field in my TZQuery and in the expression I set
sum(amountcol1)

I then activate it. for now all values in the table are equal to 0 (not null). When I try to make a sum at runtime with this field, the value is NULL.

Why ? What's wrong ? Also if I can't show this field in a TDBGrid.
This aggregate field is separated from the other fields if I double-click on the TZQuery. I've also been able to create a TAggregate that is not separated, but I can't activate the Query anymore.

Please help.

Bob