yoyie yoyie
yoyie yoyie

Reputation: 415

how to sum by two groups in crystal report

i want to get the sum by the groups in crystal reports..

    amount     order      id
  ----------------------------- 
    100.00       1       A001
    100.00       1       A002
    200.00       1       A001
    100.00       2       A001
    100.00       2       A002
    400.00       2       A002

and i want them to group like this

    amount     order      id
  ----------------------------- 
    300.00       1        A001
    100.00       2        A001
    100.00       1        A002
    500.00       2        A002

what i've done so far is in formula fields i make SUM({amount},{id}) and name it byID and 2nd formula is SUM({@byID},{order}) and name it byOrder which is it gives me an error saying "This field cannot be summarized.". uhmm..how to do this ? glad for any help :)

Upvotes: 1

Views: 1624

Answers (1)

Siva
Siva

Reputation: 9101

Approach is wrong.. trying to sum which is already summarized.

first group by id and then group by order and take summary for both groups.

Upvotes: 1

Related Questions