Report Sorting question

D

Darby Holmes

I have a Grouping on 'ID' with the value assigned
to 'ascending' and the report generates:

118
342
62
77

I assume the engine is treating 62 like 620 and 77 like
770, but I'm not sure. Any suggestions on how to get
these in numerical order?

Thanks
 
C

Cheryl Fischer

Darby,

Your fields are likely Text type. Text fields (even if they have a meaning
which is numeric) do not sort on the perceived numeric value, rather each
character is evaluated for sorting purposes.

In the query which underlies your report, create a calculated field as
follows:

SortID: Val([ID])

Then, in your report, use that field for your Grouping.

hth,
 
D

Darby Holmes

Cheryl - perfect, you're the best!

Thanks!!
-----Original Message-----
Darby,

Your fields are likely Text type. Text fields (even if they have a meaning
which is numeric) do not sort on the perceived numeric value, rather each
character is evaluated for sorting purposes.

In the query which underlies your report, create a calculated field as
follows:

SortID: Val([ID])

Then, in your report, use that field for your Grouping.

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

I have a Grouping on 'ID' with the value assigned
to 'ascending' and the report generates:

118
342
62
77

I assume the engine is treating 62 like 620 and 77 like
770, but I'm not sure. Any suggestions on how to get
these in numerical order?

Thanks


.
 
C

Cheryl Fischer

Thank you and good luck with your project.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Darby Holmes said:
Cheryl - perfect, you're the best!

Thanks!!
-----Original Message-----
Darby,

Your fields are likely Text type. Text fields (even if they have a meaning
which is numeric) do not sort on the perceived numeric value, rather each
character is evaluated for sorting purposes.

In the query which underlies your report, create a calculated field as
follows:

SortID: Val([ID])

Then, in your report, use that field for your Grouping.

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

I have a Grouping on 'ID' with the value assigned
to 'ascending' and the report generates:

118
342
62
77

I assume the engine is treating 62 like 620 and 77 like
770, but I'm not sure. Any suggestions on how to get
these in numerical order?

Thanks


.
 
Top