Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sort printing invoices

(0) ShareShare
ReportReport
Posted on by 678

Hi all.

I'm modifying standard invoice report (206), because I want to change the order in which the registered invoices are printed. Rather than no. I want to be sorted by bill-to name, e.g.:

Invoice no. 12 - Bill-to name A
Invoice no. 8 - Bill-to name B
Invoice no. 15 - Bill-to name B
Invoice no. 3 - Bill-to name C
Invoice no. 6 - Bill-to name D
Invoice no. 13 - Bill-to name D
.
.
.

The problem is always sorted by number. I've tried:

- Change the "Sales Invoice Header" Dataitemtable view property to "Bill-to Name". -> No success.
- Change the order property in all the tables of the layout. -> No success.

What else I can try? It is impossible?

Thanks in advance. Regards.

*This post is locked for comments

  • Suggested answer
    keoma Profile Picture
    32,727 on at
    RE: Sort printing invoices

    add a new key to table sales invoice header "bill-to name, no." and use the new key as new sorting key in report 206. you can to it also by code using setcurrentkey.

    alternative option: copy the (filtered) records in report 206 into a temp table tempsalesinvheader one by one and resort the recs within the loop.

  • Community Member Profile Picture
    on at
    RE: Sort printing invoices

    HiJose Angel Lopez,

    Create one new key in Sales Invoice Header table, key name : Bill-to Customer No.,No.

    go to 206 - Sales Invoice Header Report, Sales Invoice Header Data Item Properties, set

    DataItemTableView field - SORTING(Bill-to Customer No.,No.)

  • jaloag Profile Picture
    678 on at
    RE: Sort printing invoices

    Hi Miguel, I've opened your link and it´s an older version than the one I have installed. :-(

    Thanks.

  • Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at
    RE: Sort printing invoices

    Sure! Click here...

  • jaloag Profile Picture
    678 on at
    RE: Sort printing invoices

    Hi Miguel.

    Your link does not work, can you send it again?

    Thanks.

  • Community Member Profile Picture
    on at
    RE: Sort printing invoices

    I would advise you not to tamper the standard 206 report. It would be better to create a copy of it, on your object ID range and to work on that copied version. By using Report Selection functionality you can simply change the report called when printing invoice. Avoid changing the standard objects whenever possible and isolate your changes in separate objects as much as you can. If you must change the standard object, do it with as less code as possible.

  • Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at
    RE: Sort printing invoices

    Hi Jose Angel, did you solve your issue??

  • Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at
    RE: Sort printing invoices

    Hi again! I think that you can solve your issue applying a hotfix. For R2 I found that: mbs2.microsoft.com/.../KBDisplay.aspx;EN-US;2934571

    But if you want to be sure, apply the latest CU :-)

    Good luck and please, let me know the results!

  • Jan Veenendaal Profile Picture
    510 on at
    RE: Sort printing invoices

    Sorry to hear that. I've tried this in NAV2015 and it works ok there.

  • Suggested answer
    Miguel Llorca Gómez Profile Picture
    7,019 User Group Leader on at
    RE: Sort printing invoices

    Hi Jose Angel,

    Did you try activating "interactive sorting" feature (it allows sorting the report columns as needed).

    The setup for this feature is simple. In the necessary textbox, enable the Interactive Sorting property and assign the sorting cell:

    Enabling the interactive sorting property

    It is also possible to assign the sorting to multiple cells at the same time, so that each report column will be sorted separately.

    Hope this helps!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans