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

Thanks

chkuehAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

simpsolCommented:
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]
 FROM A
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.
0
mlmccCommented:
In Crystal after grouping on the Item, you put the information in the group header or footer and suppress the details.

mlmcc
0
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
0
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.

Thanks
0
mlmccCommented:
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
Click INSERT --> SUMMARY
Set it to be it the group you want it in.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.