Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting problem

Status
Not open for further replies.

pgtek

Programmer
Sep 28, 2001
1,180
0
0
CA
Hello
Crystel 8.5 and sql database
I have a report that contains 5 groups
1 district
2 school name
3 grade level
4 class name
5 form
and in the detail section i have a formula
@studentname
replace({Answer_Docs.LName},' ','')+", "+ replace({Answer_Docs.FName},' ','')+" "+{Answer_Docs.MName}

the problem is it's not sorting the student lastname by alpha
i tried inserting the formula in the sort order and no change
also tried removing the formula from the sort and place the lastname in the sort but still no changes in the sort order.
How can i get the last mane to come out in the right order.
i don't want to create a group on the last name for many student have the same last name
Thanks



pgtek
 
pgtek, are there any additional sorts active in the detail section?

I know you said that you don't want to create a group on the students last name, but just for troubleshooting purposes, can you create a group on the last name, and make it Group1. If it orders correctly, make it Group6. If the order replicates the issue you're currently having in the details section, then you know the order is being broken up by one of the parent groups.

Naith
 
hi
I have all these group set keep together and repeat header on each page in the group window i have all set order ascending by default setting
i tried creating a group 6 on last name and it does sort from a to z



pgtek
 
Hi

Are you picking the data from tables or from a SP or a Command?

if the latter is true you can concatenate "last name and first name" on the query and then use that to group.





Mo
 
hi
i'm using a table that has the student names
thnks


pgtek
 
If you can group at the lowest level, and have it ordered successfully, then you must have more than one sort applied at a detail level. Go into your sort manager and ascertain whether you can eliminate the other sort fields.

MisterMo, whilst you could adopt a concatenated LastName|FirstName approach, as this is not a unique field, you would run into issues if it ever turned out you had two Sarah Greens on your books.

Naith
 
hi
I have all these group set keep together and repeat header on each page in the group window i have all set order ascending by default setting
i tried creating a group 6 on last name and it does sort from a to z when i place that one as group 1
but when i place it in group 6 no sort

pg

pgtek
 
That's the first test I wanted you to ascertain. I thought you said that it sorted when you had it in Group6. If, when you place it as Group6, it's replicating the sort you get in your details section, this is because the other 5 parent groups are breaking the sort up.

The sort is behaving correctly in view of all the parent groups you have. The only way to enforce the sorting above this is to remove some of the parent groups.

Naith
 
Hi
Thank for the reply
I fix it by insering new page after the goup5 and it work fine now


pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top