Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Summing repeated entries Post Reply Post New Topic
Author Message
Carrico
Newbie
Newbie
Avatar

Joined: 03 Feb 2014
Online Status: Offline
Posts: 3
Quote Carrico Replybullet Topic: Summing repeated entries
     Posted: 03 Feb 2014 at 2:34pm
The report I'm working on lists equipment and the quantities of each piece.  Sometimes a piece is repeated in the list such as:

Quantity   Description
2              Speaker stand
4              Speaker stand

I would like my report to show "Speaker stand" once with a quantity of 6.

How do I do this?


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Feb 2014 at 2:31am
group on description
sum quantity at the group level
place in group header or footer
suppress the details and header or footer (which ever you do not place the desciption and sum)
IP IP Logged
Carrico
Newbie
Newbie
Avatar

Joined: 03 Feb 2014
Online Status: Offline
Posts: 3
Quote Carrico Replybullet Posted: 06 Feb 2014 at 4:24am
Thank you. Sorry for the delayed response.

I have put the description in a group as you said and a sum quantity next to it and it still doesn't sum them.  The description does have a select formula that is working properly.  I'm new at this but I'm pretty certain I've done what you've suggested.  Is there anything I might have done wrong?

BC
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 06 Feb 2014 at 5:22am
are you displaying the group footer? That is the only one that will have the correct value. The summing formula in the group footer would look something like:
sum({table.field}, {table.groupField})

HTH
IP IP Logged
Carrico
Newbie
Newbie
Avatar

Joined: 03 Feb 2014
Online Status: Offline
Posts: 3
Quote Carrico Replybullet Posted: 06 Feb 2014 at 8:08am
Yes, I am displaying in the group footer.  The description is a string of text that describes the piece of equipment.  I am selecting that from what the form inspector tells me in the db. The sum field is also taken from that reference which is quantity and that is a number.  No matter what I do I still get the entries as they are listed above.

BC
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Feb 2014 at 5:12am
if the display is the same as the original and you are only displaying the group footer, then I would suspect that something is wrong with the grouping criteria...perhaps it is pointing to another field.

HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum