Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping Problem in crystal report Post Reply Post New Topic
Author Message
lily_mogra
Newbie
Newbie
Avatar

Joined: 15 Dec 2006
Location: India
Online Status: Offline
Posts: 1
Quote lily_mogra Replybullet Topic: Grouping Problem in crystal report
    Posted: 15 Dec 2006 at 5:12am

Hi Guys,

I have one table order
 with two colums orderid and orderamount

orderid and orderamount
1000         $10
1000         $20
2000         $30
3000         $40
4000         $50
4000         $60

I want to display records in crystal report
OrderId       Sum of order amount
1000           $30
2000           $30
3000           $40
4000          $110

I have create formula for orderamount sum(orderamount,OrderId)
this crystal report group by orderId.
but i am not geting actual answer

Thanks in advance for help

Lancecoder


 

IP IP Logged
emoreau
Newbie
Newbie
Avatar

Joined: 13 Nov 2006
Location: Canada
Online Status: Offline
Posts: 8
Quote emoreau Replybullet Posted: 15 Dec 2006 at 5:24am
I see at least 2 way of doing it:
 
1. sum your data directly from your datasource:
     select orderid, sum(orderamount) as orderamount
     from YourTableName
     group by orderid)
 
2. in your report, have the orderid and orderamount fields in the details and sum your amounts grouped by the order id but suppress the Group header and the Details sections so that you will only see the group footer.
HTH

Eric Moreau
MCSD, Visual Developer - Visual Basic MVP
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.016 seconds.