Sorting lines in a Sales Order manually

AitorEGAitorEG Member Posts: 342
Hello everyone,
I have one question around sorting lines, in for example, a sales order. Also could be in other pages/reports as for example, Assembly Order.
One of our customers needs to change the order of the lines manually in the page, and after that, when printing the report, the report should print the lines in the order the customer has set.
My first idea has been to find if NAV gives me the possibility to tha that, through the use of a button on the page, or something like that. But I didn't finde the way.
Now, my next idea is to create a new field in the SalesLine, and show tha field as visible and editable in each line inside de subform. The user, will write for each line the position that wants to be shown, and after refreshing (may be including a new button), the lines will be shown in that order. And when he wants to print the report, the lines in the report will be sorted by that field, to print them in the order that the final user wants.
What do you think about my approach? Do you think is it feasible? ANy other known approaches?
Thank you all for your help

Comments

  • jwilderjwilder Member Posts: 263
    Have you tried this:
    myreport.settableview(salesline);
    myreport.run;

    The report should run based on the Sales Line sort.
  • AitorEGAitorEG Member Posts: 342
    Thank you for your help.
    I've made a duplicated field in the lines, a duplicate of the Lines No. This field will be editable from the page itself, and the line in the report will be sorted by this new field. It works perfectly
Sign In or Register to comment.