Print D365FO Reports Merged with Attachments to Network Printers

Some time ago, we wrote an article on how to merge PDF product specifications to printed Purchase orders. Read the article >>

The solution presented in the above article is based on capability to merge PDF documents using Docentric Free Edition utilities. It enables you to view, email, archive or distribute a D365FO report merged with any PDF attachments. Report can be either Docentric- or SSRS- based, and report distribution covers all Docentric print destinations (Screen, Email, Print archive, File, Printer with the Print as PDF option turned on) except printing to network printers (Printer print destination).

We are now going to extend this solution to support printing of reports merged with PDF attachments to network printers in D365FO cloud environments. The only limitation that will remain is printing to network printers in on-premises environments.

PDF to EMF conversion utility, which has been introduced in Docentric version 3.4.7, enabled the implementation of printing reports merged with PDF attachments. This utility feature is part of Docentric Free Edition.

The Coding Part - With Added Support for Printing to Network Printers

In the previous article, we provided the working code for merging the Purchase order report with PDF attachments fetched from the corresponding products (the Item records), assuming that these attachments are the product specifications related to the printing Purchase order lines. Of course, you can filter attachments on Items per Tags, Category, Attachment description, etc. The printing Purchase order report, after it's merged with the product specifications, is further regularly viewed, emailed, archived or distributed using Docentric print destinations.

We're now adding a new code - an additional event handler for the same delegate DocReportRunDelegates.generateReportContent(), to support also the printing of a Purchase order report merged with the product specifications (fetched as Attachments which are PDF documents) to the network printer that has been selected on the Print destination settings form > Docentric Printer print destination. Let's take a look.

The above solution works for reports generated in PDF format, merged with PDF attachments and distributed to all Docentric print destinations. The only limitation is printing to network printers in on-premises D365FO environments.

Check the previous article: Append PDF Product Specifications to Printed Purchase Orders in D365FO >>


Leave a Reply

Your email address will not be published. Required fields are marked *


Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>