Creating a ascending sorting on a non key field

MarcosMarcos Member Posts: 55
Ladies en gentlemen,

Good day, i making a report in Navision 4.0 and i want ascending sorting on a field from a data item.
The filed is a name (text) field but not a key field in the table (vendor), how can i sort on this kind of field ???

If u can help me many THNX.

Greetzzz

Marcos

Answers

  • krikikriki Member, Moderator Posts: 9,118
    If you work on SQL, you can just create the key BUT NOT maintain it in SQL. In this way SQL doesn't lose time maintaining it, but you can use it to sort in Navision.

    Other possibility:
    Create a new table with the fields from vendor you need, but without ANY code in it. You can use any ID (of course within 50000..99999). No need to add this in the license file, because this table will only be used as temptable and will NEVER contain records in the database.
    Add in this table the key on name.
    In the report:
    Read the vendors you want to print and put them in the new table (that is defined as a temptable).
    When you need to print them, use a dataitem integer (instead of vendor) for reading the temptable sorted on name (see How To create a report which is based on a temporary table?).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • MarcosMarcos Member Posts: 55
    THNX for the help, but this is a very difficult action for a adhoc, one time print only report.
  • kinekine Member Posts: 12,562
    You can use the Search Name for the sorting... by default, Search name is same as Name, just only uppercase...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • MarcosMarcos Member Posts: 55
    Yep, i saw it later...........
Sign In or Register to comment.