Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.