Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping on a formula field question Post Reply Post New Topic
Author Message
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Topic: Grouping on a formula field question
     Posted: 22 Jun 2010 at 5:59am
Hi all,
 
Fairly new to crystal but can usually figure/find a solution somehow.
 
Not for this issue yet. I've got a report that I need to group by dollar increments (<20000, >50000 and between 20-50000)
 
I needed to create a formula to get the total value for each individual.
 
I dont see how I can group them by the formula field. When I try to insert a group I only see the report fields not any formulas I can select.
 
Is there a way to group by the results of my total formula?
Newbie reports
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jun 2010 at 6:07am
For clarity are you trying to group on a SUM of a field from another group in the report?
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 22 Jun 2010 at 6:41am

DBLANK- Yes. the formula is below:

Sum ({vwsrt_SourceMarket.SourceTotalMarket}, vwsrt_SourceMarket.par_ssn} )
 
 
Newbie reports
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jun 2010 at 6:50am
You cannot regroup using this but you can sort (TOP N sorting) and use a formula field to label if you want.
for TOP N sorting click on the Group Sort Expert (red arrow over a blue graph bar)
For this Group select sort ALL
based on Sum ({vwsrt_SourceMarket.SourceTotalMarket}, vwsrt_SourceMarket.par_ssn} )
 
 
NOTE:
If you can get your SUMS aoutside of crystal before you bring it into the report (like a stored proc) you could do your grouping.


Edited by DBlank - 22 Jun 2010 at 6:51am
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 22 Jun 2010 at 7:01am
Thanks DBLANK
 
Bummer.
 
I initially tried the Top n route but it wasnt getting me exactly what I needed.
 
I'll see if I can get the total from another source or try outside crystal.
 
 
Newbie reports
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jun 2010 at 7:05am
Note: you can still label the fields/groups as you wanted, just not group them.
Good luck.
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