How to combine same item in Crystal Report 10?

Hi, Experts

I have 1 scenario as below:-

DB_ID      Item                               Quantity               Required Date
1              Box 15" x 10"                    10               13-May-2011
2              Box 10" x 10"                    15               13-May-2011
3              Box 15" x 10"                    10               13-May-2011

How can i combine above example 2 same items, so that in crystal report it appear 2 lines as below:-

              Item                               Quantity               Required Date
1              Box 15" x 10"                    20               13-May-2011
2              Box 10" x 10"                    15               13-May-2011


Who is Participating?
mlmccConnect With a Mentor Commented:
You can have several groups.

Add a group on item then add one on date

You can summarize the group.
Easy way
Put the field in the details section
Right click it
Set it to be it the group you want it in.

simpsolConnect With a Mentor Commented:
If you do not care for the DB_ID Column then you can change the SQL as
SELECT Item, Sum( Quantity) AS Quantity, [Required Date]
GROUP BY Item, [Required Date]

If you want to a pure cyrstal report solution, then you will have to create a new group by Item and sum the  Quantity for the group.
In Crystal after grouping on the Item, you put the information in the group header or footer and suppress the details.

chkuehAuthor Commented:
Thanks simpsol....will use your code to display the record on the interface.

Hi, mlmcc

How can i sum the Quantity after i group it by the item? Thanks
chkuehAuthor Commented:
HI, mlmcc
can i group it based on 2 conditions? 1 is item and 1 is RequiredDate. Sometimes some of the items are same but the RequiredDate is different so i must consider it.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.