aggregates problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

aggregates problem

injektiloinjektilo Posts: 113Member
hi all,

i have a clientdataset with

TICKET
POS
USER
CLIENT
PRODUCT
PRICE
AMOUNT

and an internal calc field

SUBTOTAL

that i calculate in the OnCalcFields event (PRICE * AMOUNT)

next, i have two aggregates

TOTAL
CLIENT_TOTAL

with expressions

SUM(SUBTOTAL)

the first one has zero as groupindex, the second one has 1 as groupindex.

then i have, an index IDX_CLIENT (groupindex 1).

The problem is when i add records i get every record at least 30 times in my dbgrid. What happens here?

thankx

Comments

  • pak77pak77 Posts: 28Member
    : hi all,
    :
    : i have a clientdataset with
    :
    : TICKET
    : POS
    : USER
    : CLIENT
    : PRODUCT
    : PRICE
    : AMOUNT
    :
    : and an internal calc field
    :
    : SUBTOTAL
    :
    : that i calculate in the OnCalcFields event (PRICE * AMOUNT)
    :
    : next, i have two aggregates
    :
    : TOTAL
    : CLIENT_TOTAL
    :
    : with expressions
    :
    : SUM(SUBTOTAL)
    :
    : the first one has zero as groupindex, the second one has 1 as groupindex.
    :
    : then i have, an index IDX_CLIENT (groupindex 1).
    :
    : The problem is when i add records i get every record at least 30 times in my dbgrid. What happens here?
    :
    : thankx

    is there any chance of seeing some code?
    :

Sign In or Register to comment.