Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Group by One Field Sort by Another Post Reply Post New Topic
Author Message
BernieHunt
Newbie
Newbie


Joined: 03 Apr 2007
Location: United States
Online Status: Offline
Posts: 21
Quote BernieHunt Replybullet Topic: Group by One Field Sort by Another
    Posted: 04 Nov 2008 at 3:37pm
I have a report of patient statements. Each patient's data is tracked by their PatientID. Crystal Groups on the PatientID field. At the end of each ID is a new page.
 
I'd like to sort the statements by a different field. For example the Last Name. When I look into the Record Sort Expert, it won't let me put the Last Name field as a higher sorting priority than the PatientID.
 
How do I sort by a field other than my Group Sort?
 
Also, is there a way to keep Crystal from sorting and let me sort the dataset before giving it to Crystal?
 
Thanks,
Bernie
 
IP IP Logged
jonberardi
Newbie
Newbie


Joined: 24 Jun 2008
Location: United States
Online Status: Offline
Posts: 6
Quote jonberardi Replybullet Posted: 06 Nov 2008 at 10:08am

I have the exact same question.  I am grouping records by UserID and need it sorted by Last Name. 

Any help is greatly appreciated!

- Jon

IP IP Logged
BernieHunt
Newbie
Newbie


Joined: 03 Apr 2007
Location: United States
Online Status: Offline
Posts: 21
Quote BernieHunt Replybullet Posted: 09 Nov 2008 at 7:03pm
I didn't find a way in Crystal, but I found what I think is a better way for me. If you open the Group Expert and in the right pane select the group you are sorting by. Click the options button to see the Change Group Options dialog. The second drop down box is the order selection. Change that to "in original order".
 
This returns control of the sort order to your code. You can sort your data any way you want in the dataset and then hand it to Crystal. Crystal will group by the field you selected, but the sorting is what you gave it.
 
This what I've found works for me, but I haven't heard from anyone else on the subject.
 
Bernie
IP IP Logged
Pradeep1210
Newbie
Newbie
Avatar

Joined: 30 Jun 2011
Location: India
Online Status: Offline
Posts: 1
Quote Pradeep1210 Replybullet Posted: 30 Jun 2011 at 4:14am
Please have a look here for a possible solution:
http://pradeep1210.wordpress.com/2010/04/07/grouping-on-one-field-and-sorting-on-another-in-crystal-reports/




Edited by Pradeep1210 - 30 Jun 2011 at 4:16am
http://pradeep1210.wordpress.com/
IP IP Logged
shortwrite
Newbie
Newbie
Avatar

Joined: 24 Mar 2011
Online Status: Offline
Posts: 5
Quote shortwrite Replybullet Posted: 14 Sep 2011 at 6:07am
BRILLIANT!!  I read your solution, and it worked for me...  I am relatively new, and have had no training...  (OTJ only)
 
THANKS!  Smile
IP IP Logged
jorrebor
Newbie
Newbie


Joined: 12 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 18
Quote jorrebor Replybullet Posted: 23 Nov 2011 at 4:39am
How about interactive sorting?

Once i present crystal with an ordered list, the interactive sort control (on the other field) destroys the original order.

I would like to add 2 interactive sort controls without grouping. Any ideas on this?

thanks!
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.