Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

(0) ShareShare
ReportReport
Posted on by 2,348

Hello Expert Problem Solvers,

We have a need to print a lot of old invoices. I was able to produce a list of the Posted Sales Invoice numbers to print (that have all the Items of interest for the date range requested). The issue is there are too many invoices to print manually, and the invoice numbers will not be in a sequential range.


*I need a clever way to batch print all these invoices from the list of invoice numbers.


An idea I've entertained for the solution so far is to use a windows macro to copy one invoice number off the top of the list into NAV and print, delete the top row off the list and repeat... but I'm not sure yet.

If you've done this before or have a clever idea please let me know.


Thank you very much.

*This post is locked for comments

  • Andrea Antoniazzi Profile Picture
    Andrea Antoniazzi 285 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    Hi Alex A,

    when you print a document you can click on Print - Schedule in order to insert a new record in the job queue.

    Maybe you can try to use an XmlPort for insert in the job queue one record for each invoice.

  • Alex A Profile Picture
    Alex A 2,348 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    Thank you all. I was hoping for a non C/AL development type solution, but there seems to be a consensus of doing this by developing a code unit that loops through the invoice numbers stored in a table and prints. This is a good idea.

    There will be too many invoices for the alternate options. We are currently looking at using a windows macro to copy each invoice number from the list and print it from NAV, but we have not done anything yet. I was also considering scripting this in VB and trying to hook into NAV, but perhaps a custom C/AL code unit is the straightforward solution. Thank you Rabindra for making the suggestion first. I will be considering this as an option if we do not find another way.

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    I guess you are as usual searching for a non-developer, but a good user solution :-).

    There is one option to create a longer filter of invoice numbers using "|" and put it in the No. field before printing in the report selection window. You can create such filter easily by copypasting it from Excel into notepad and replacing the spaces by "|".

    So, you can copy numerous invoice numbers and put them in the No. field - it can speedup the manual printing process significantly.

  • Andrea Antoniazzi Profile Picture
    Andrea Antoniazzi 285 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    Hi Alex A,

    the list of the invoices is in Nav or out of the system (notepad, excel...)? How many documents do you have to print?

  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,300 Super User 2025 Season 1 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    Hi,

    If I understand you correctly you want to print a Report for posted invoices which are lets says before 01/01/2009. (just an example).

    IF that is the case then you can just run the report and filter on request page as posting date <=01/01/2009

    But if you even the selected invoices then the best way is -

    1. Create a table with one field Invoice No.

    2. Insert all invoice no in that table, using xmlport / rapid start.

    3. Once import Run a codeunit which takes the no from it and applies that as a filter to report and print it.

    If you want to do it automatic make sure you specify the printer for the report in Printer selection so it automatically takes that.

    Let us know if any issues.

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    You need to write a program/report to print all the document in batch.

    You can look at the new version of Navision where in navision provided batch posting of Invoices .This will give you an idea.

  • Verified answer
    Rabin Profile Picture
    Rabin 2,976 on at
    RE: Batch Print Old Invoices from a List of Posted Sales Invoice Numbers

    Hi Alex,

    You can use Job Queue. Write a function that keeps the loop until all the listed documents are printed out.

    you can hardcode the list or create a table temporarily with all the invoice numbers.

    I had once worked on a similar case where, each invoice had to be sent to its respective assigned contact email address.

    But here in your case you do not need to worry about the order or recipient., just print in a loop...

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 Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans