Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sort by Group Post Reply Post New Topic
Author Message
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Topic: Sort by Group
     Posted: 01 Feb 2010 at 10:00pm
Hello,
 
I have a report that has a two "Groups" set up. I then need to be able to "Sort" by a field within one of those groups.
 
eg, our data is grouped by product, then job number, i then need to sort it by due date.
 
Is this possible?
 
 
The usual sorts do not work as the group takes presedance
 
thanks in advance
stephen
Thanks in Advance
Stephen
"CR Newbie"
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 02 Feb 2010 at 9:12am

Group sorting always takes presedance over any field sorting.  Not sure what you are trying to accomplish.  You should be able to sort by the due date inside of the inner group?!?

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Feb 2010 at 9:37am
is the group the last one?  if so, you should be able to sort by date as well, but I always find it a hassle, so I just create a third group. So my groups would be:
 gh1 - product
  gh2 - job
   gh3 - due date
 
there is probably a cleaner way (as someone complained that this was a hack) but it took him at least a day to figure it out.  I guess I'm just lazy and this works...
 
HTH
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 03 Feb 2010 at 2:38am
Lockwelle, you shouldn't need the third group.
 
If you add a Sort by the Due Date it should sort inside the lowest hierarchy group.
 
Stefshuuj, is what you are saying that the whole report needs its details in Due Date order irrespective of the Product and job Number? In which case, you will need to add an outer group based on Due Date. You sound a bit confused in your aim.
IP IP Logged
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Posted: 03 Feb 2010 at 2:56am
The reason the report has the two initial groups is:
 
1. the report groups by product. this part works fine.
2. the report groups by job number. this is because each job can have more then one item per job number. so i have hidden the details section and i have all of the fields in the job number group line. this allows me to have totals per job number rather then per item.
3 we then want to sort by due date.
 
the two groups work, however the due dates are then jumping all over the place. i need them to be from oldest to newest.
 
i hope this is a bit clearer.
 
thanks
Thanks in Advance
Stephen
"CR Newbie"
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 03 Feb 2010 at 3:34am
So what you are saying is that the report is sorting within each Product by Job Number. You want it to be sorted within each Product by Job Due Date? Is that right?
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