Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Sorting on formula field Post Reply Post New Topic
Author Message
jchan
Newbie
Newbie
Avatar

Joined: 23 Jun 2009
Online Status: Offline
Posts: 5
Quote jchan Replybullet Topic: Sorting on formula field
    Posted: 24 Jun 2009 at 6:04pm
Can someone tell me how to sort on a sum of a formula field. I have a report that list a group along with the sum for that group. The report now is sorted in ascending order by the group name (GF1). I would like to sort it by the group sum in descending order.
 
Formula is  {spRptSector;1.Bal}/1000
Group Balance =  Sum of @Bal
 
 
Current sort:
Sector              Balance
--------              ------
Services           960,496
Construction    263,769
Stores              494,087
 
Desired sort:
Sector              Sum
--------              ------
Services           960,496
Stores              494,087
Construction    263,769
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Jun 2009 at 6:53pm
in this particular case you can use the summary function as a SUM of spRptSector;1.Bal at group1 and then do a top N and sort on the SUM field.
Set  your top N high enough to display all of your groups.
suprress the SUM field and show your existing formula.


Edited by DBlank - 24 Jun 2009 at 6:55pm
IP IP Logged
jchan
Newbie
Newbie
Avatar

Joined: 23 Jun 2009
Online Status: Offline
Posts: 5
Quote jchan Replybullet Posted: 25 Jun 2009 at 8:05am
Thanks DBlank. Worked like a charm.
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.047 seconds.