Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: group by / sum Post Reply Post New Topic
Author Message
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Topic: group by / sum
     Posted: 13 Jul 2010 at 10:55pm
Hi,

I'm not an expert with CR and can't find out how to perform an group by with a sum in CR XI.

So I have a report in CR XI linked to an Excel spreadsheet (8.0).
There are 3 groups in this report.
The details section has 6 fields, F1 to F6 and I need to sum fields F5 and F6 when fields F1 to F3 are equal.

If I could edit the SQL query, it would be much easier, but unfortunatly I can't.

So is there a way to do what I need without changing the whole report's groups and adding running totals, ...?

Many thanks for your precious help.

rv

IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 14 Jul 2010 at 12:39am
if you can give us more detail (example) it will better.
 
 
Emir W
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 14 Jul 2010 at 2:29am
well let's try ...

At the moment ...

Group 1 Continent
   Group 2 Country
      Group 3 Area
F1 Town   F2 Street       F3 Street       F4 Whatever     F5 Men    F6 Women
N-Y           5th avenue   Manhattan     lucky you :)       5000       5500
N-Y           5th avenue   Manhattan     lucky you :)       6000       5000
N-Y           42nd Street   Manhattan    lucky you :)       7000       7000


to achieve ...

Group 1 Continent
   Group 2 Country
      Group 3 Area
F1 Town   F2 Street       F3 Street       F4 Whatever     F5 Men    F6 Women
N-Y           5th avenue   Manhattan     lucky you :)       11000     10500
N-Y           42nd Street   Manhattan    lucky you :)       7000       7000

I hope it makes sense ...

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jul 2010 at 3:30am
if F1=F3 then F5+F6 else 0

Edited by DBlank - 14 Jul 2010 at 3:31am
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 14 Jul 2010 at 9:26am
Or..
you can create a formula (e.g.: F1F3) where it contains F1+" "+F3.
and make a group (G4) based on this formula.
 
then you can sum for F5 and F6 based on group F1F3.
 
tips:
delete field F1F3 in G4 section and put all fields in this section.
so, you'll get the format.
 
 
hope it help.
 
Emir W
IP IP Logged
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