Sort A Report With Code

ricky76ricky76 Member Posts: 204
I have just been asked to ammed a report by giving the user the option of how they want to sort the report. I have an option box with their choices and then have code to sort it depending on what they choose by using SETCURRENTKEY. Although this works it sorts it descending and i want it to sort ascending. Is there any way i can do this?

Any help would be appreciated?

Comments

  • BalelloBalello Member Posts: 61
    You can call Record.ASCENDING(true) after SetCurrentKey ... but I thought it was the default......
    I don't envy anybody who caught up his aim. I travel gladly.
  • atarisataris Member Posts: 109
    On DataItemTableView property report you can specify a key and sort order, either decending or ascending so you shouldn't have to use code but this all depends on your report structure.

    Atually forget what I said I never read the question properly.

    :lol:
  • Torben_R.Torben_R. Member Posts: 99
    If you don't select a Key (and Order) in DataItemtableView the user will have a Sort-button. Now the user can select any key and choose ascending or descending.

    Why not use standard Navision instead of adding a lot of code.
Sign In or Register to comment.