Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Help combining like fields into a single one? Post Reply Post New Topic
Author Message
blue
Newbie
Newbie


Joined: 22 Sep 2009
Online Status: Offline
Posts: 2
Quote blue Replybullet Topic: Help combining like fields into a single one?
    Posted: 22 Sep 2009 at 11:29am
Hi everyone, I'm a relative noob when it comes to Crystal Reports and writing formulas for it and such. Mostly I just use it for little tweaks, but maybe with some direction you can help me out with my current task.

On our invoices, for one reason or another, we can have multiple instances of the same product show up as separate line items with different quantities. What I would like the crystal report to do is identify if the same Product Code (a unique identifier to the product) shows up more than once, and if it does, combine all instances of that product into a single line item with the quantities added together as well.

Hopefully this isn't too difficult to do. Please let me know if this doesn't make sense and I can attempt to explain further.

Thanks in advance! Smile
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 22 Sep 2009 at 1:14pm
You should use a group. You go to the Insert-> Insert Group. That will insert a group on your report and will open a dialog asking you which field to group by which would be your Product Code field. T
 
There are a number of ways to sum the total but the easiest I believe will be for you to place the quantity field in the detail section. Right click on that field and select insert summary field. It will open a dialog box and select place summary in group footer.
 
If you dont want all the Quantity fields to show, move the blue section on the side of the report and right click on Detail section and choose suppress section. (You can also use the Section Expert for this.
 
What you end up with is
Group Hdr Product Code
Detail Quantity ( this wont show since its suppressed
Group Ftr Total of Quantity for that product code.
 
There are things you can do with placement like moving the Product Code field to the Group Footer if you want it to show on the same line as the summary  and so on.
 
Hope this helps
 
Regards,
 
John W.
 
IP IP Logged
blue
Newbie
Newbie


Joined: 22 Sep 2009
Online Status: Offline
Posts: 2
Quote blue Replybullet Posted: 23 Sep 2009 at 4:14am
Thank you for your help John! I am going to try this out now and I'll report back on how it goes.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.045 seconds.