ordering records in report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a report that will list some scores for a list of subjects.
Each subject has an ID code which is digits+ two characters. So for istance
I have this list of subjects: 1SE; 2SE; 3SE;....;10SE.
If I order the outcome of the report for ID asc, i will have the report
starting from 10SE.... which is formally right because the ID's field is
text data type.
Since i would like to have the report starting from 1Se and following with
2Se; 3SE;...;10SE i have tried many thinks...but none worked.
I tried ordering the query underlying the report, but this order is lost
when I open the report and it keeps going starting from 10SE...
Then i tried setting the Sorting/Grouping properties of the report to
=CINT(LEFT(ID,LEN(ID)-2)) but I constantly receive an error.

What else?
Thanks
Rocco
 
hi Rocco,
Each subject has an ID code which is digits+ two characters. So for istance
I have this list of subjects: 1SE; 2SE; 3SE;....;10SE.
Add a calculated field in your report recordsource to get your order:

Order: Right("00000000" & [YourID], 8)

The number of zeros and the cut length in the Right() function depends
on the maximum length of your id.


mfG
--> stefan <--
 
Have you tried ordering on Val([ID])? It returns the integer value of a
string, so Val([10S]) = 10, etc.

Dave
 
Back
Top