Print Page | Close Window

Grouping & Sorting Issues

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6262
Printed Date: 04 May 2024 at 3:07am


Topic: Grouping & Sorting Issues
Posted By: olinmds
Subject: Grouping & Sorting Issues
Date Posted: 05 May 2009 at 8:49am
Hi All,
Very NEW to Crystal Reporting and need help!!  Cry
 
In this report I have two groupings by different numbers. The first group sorts fine as I am just needing the regular ascending order. It is the second grouping of a number that I am having trouble with. Are you ready for fun?

 

It is a six digit number that I need to sort in ascending order by the last two digits  à If there is a match in the last two digits then I need to sort off of the last four digits à and if there is a match (with the four digits) then the number sorts on the complete six digits. 

 
I was able to create new formula fields [Right (MRN,2) , Right (MRN,4) , Right (MRN,6)] and sort the numbers correctly on a detail section of a different report but I have no clue as to how to do the same using the Group Expert.
 
I am using Crystal XI
 
Please know that any help is GREATLY APPRECIATED!!!!


-------------
Thanks,
Denise



Replies:
Posted By: DBlank
Date Posted: 05 May 2009 at 8:59am
I think if you create a formula field recreateing the field in that sequence then group on that (instead of the MRN field) you should get the correct ordering (set to ascending). YOu can suppress this field so it does not display.
if it is a text field then:
Right (table.MRN,2) +"-" + Right (MRN,4) + "-" + Right (MRN,6)
if it is numeric then
Right (totext(table.MRN,0,""),2) +"-" + Right (totext(table.MRN,0,""),4) + "-" + Right (totext(table.MRN,0,""),6)


Posted By: olinmds
Date Posted: 05 May 2009 at 11:22am
Hi DBlank,
 
It worked great and I am now able to start testing phase!!!!
 
THANK YOU SO MUCH!!!!  Clap
 
 
 


-------------
Thanks,
Denise



Print Page | Close Window