Sorting of TEXT-Fields

FrankieFrankie Member Posts: 8
Hello,

I'm trying to generate a Report with a normal sorting like in Excel.
Now Navision has a total other sorting of the values.

I tried the Fieldtyp TEXT and CODE but nothing works

[Excel]
1.
2.
A1.1.
A1.1.1.

[Navision]
A1.1.
A1.1.1.
1.
2.

is there a other way to sort the values?

Comments

  • krikikriki Member, Moderator Posts: 9,118
    Sorting like Excel is not possible with Navision.
    You will have to read your records, put them in a temptable and add a new field to sort on.
    The value of this field, you have to calculate. For example:
    1. => X__1.
    1.1. => X__1.X__1.
    2. => X__2
    A1.1. => Y_A1.X__1.
    A1.1.1. => Y_A1.X__1.X__1.

    I use X in case I have a numeric symbol to start with and Y if I have an alfabetic one to get the 1 before the A1 as a text.
    Remember that for text-sorting in Navision the 1 comes before the A and in SQL the A before the 1 (or vice versa).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.