Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Group By and Sum Functions Post Reply Post New Topic
<< Prev Page  of 2
Author Message
srklg1
Newbie
Newbie
Avatar

Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
Quote srklg1 Replybullet Posted: 12 Sep 2007 at 1:18pm
Hilfy,
 
Thanks for the INFO!!!  It was great help!
srklg1
IP IP Logged
srklg1
Newbie
Newbie
Avatar

Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
Quote srklg1 Replybullet Posted: 12 Sep 2007 at 1:24pm
John,
 
I ran the SQL below as written from the Add Command and received multiple records per Load ID, the unique value in our system.  For example, we will multiple entries for driver pay like $50 for Inside Delivery, $1000 for Linehaul, and $50 for liftgate.  the as written returned 3 lines with the different $ values.  I would like one line per Load ID with a total value for DriverPay, $1100 from the example above.
 
I have created this in MS Access returning one line.
 
Idea's?
 
Thanks,
 
Scott K.
srklg1
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 12 Sep 2007 at 2:05pm
Just group by  the LoadId by removing the  DriverPay from the Group By statement.
 
So the Group By would read something like this
 
Group By tablename.LoadId 
 
I am not able to test the SQL query for obvious reasons but you should get the amount you are looking for.  This will pull everything into the single LoadId  and not the LoadId  plus the three separate DriverPay lines.
 
Also I did not see any SQL in your post so I cannot comment on it.  It sounds like you are getting close to having what you want.
 
 
Regards,
 
John W.
IP IP Logged
srklg1
Newbie
Newbie
Avatar

Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
Quote srklg1 Replybullet Posted: 12 Sep 2007 at 2:45pm
John,
 
The help is so greatly appreciated!  Your suggestion worked and I did get the intended result.
 
All the best,
 
Scott K.
srklg1
IP IP Logged
<< Prev Page  of 2
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.031 seconds.