Sorting Options

  • Thread starter Thread starter David G. Hoch
  • Start date Start date
D

David G. Hoch

I'm hoping someone can help me out with this.
I've created a report on IP Addresses and I'm sorting by the address. The
addresses are not being listed in the correct order because of the
configuration.

What I'm getting is:
192.168.1.19
192.168.1.2
192.168.1.20

What I'd like to get is:
192.168.1.2
192.168.1.19
192.168.1.20

Is there a way to get this to sort correctly?

Thanks for your help.
--David
 
I'm hoping someone can help me out with this.
I've created a report on IP Addresses and I'm sorting by the address. The
addresses are not being listed in the correct order because of the
configuration.

What I'm getting is:
192.168.1.19
192.168.1.2
192.168.1.20

What I'd like to get is:
192.168.1.2
192.168.1.19
192.168.1.20

Is there a way to get this to sort correctly?

Thanks for your help.
--David

Your data is sorting correctly.... as Text, which is what the field
is.
You want it to sort as though it were number.
Add 4 new columns to the query:

Col1:Val(Left([FieldName],3)
Col2:Val(Mid([FieldName],5,3)
Col3:Val(Mid([FieldName],9,1)
Col4:Val(Mid([FieldName],10)

Sort by these columns in this order, left to right.
 
I'm not certain that I understand what you mean, but I hope my
interpretation is correct.
Are you saying that I can leave the field in the table as a Text field, and
just modify the query as you've described below? That would be great since
I do place text in this field when the IP address is not static. If it is
dynamically assigned the field value is "DHCP".

Will the breakdown that you listed actually read the text field and sort it
as a number?
Assuming that is correct, where would I put in the syntax that you listed?

Thanks for your help.
--David



fredg said:
I'm hoping someone can help me out with this.
I've created a report on IP Addresses and I'm sorting by the address.
The
addresses are not being listed in the correct order because of the
configuration.

What I'm getting is:
192.168.1.19
192.168.1.2
192.168.1.20

What I'd like to get is:
192.168.1.2
192.168.1.19
192.168.1.20

Is there a way to get this to sort correctly?

Thanks for your help.
--David

Your data is sorting correctly.... as Text, which is what the field
is.
You want it to sort as though it were number.
Add 4 new columns to the query:

Col1:Val(Left([FieldName],3)
Col2:Val(Mid([FieldName],5,3)
Col3:Val(Mid([FieldName],9,1)
Col4:Val(Mid([FieldName],10)

Sort by these columns in this order, left to right.
 
Back
Top