Numerical Sorting

  • Thread starter Thread starter Roy
  • Start date Start date
R

Roy

I have a report that has 15 sections and each has several
sub-sections. When I sort by section number, 10-15 come
before 2. Is there a way to get true sorting; i.e., 1 2
3 4 5 6 7 8 9 10 11 12 13 14 15 ?

Thanks
 
you have to change the field (I presume) to a numeric field or use the
format function to make them the same length for your sorting
i.e
format(section,"00")
HTH
Pieter
 
I have a report that has 15 sections and each has several
sub-sections. When I sort by section number, 10-15 come
before 2. Is there a way to get true sorting; i.e., 1 2
3 4 5 6 7 8 9 10 11 12 13 14 15 ?

The values are apparently stored in a text field rather than a number field, so
it is being sorted alphabetically, not numerically. You can sort on the *value*
of the contents of that field by entering the following expression into the
"Field/Expression" column in the Sorting and Grouping dialog:

Val([SectionValue])
 
Back
Top