Do you have a complex D365FO Print management setup with heavily used Account or Document overrides? When your reports get printed with unexpected results, are you wondering what the heck is going on? In that case, welcome to the club 😊.
That is why we created a tracing mechanism that logs the loaded Print management settings for a Print management report we print. We can configure whether we will see the tracing results in the Infolog or Database.
Learn how to configure tracing with Docentric >>
To fully demonstrate the tracing capabilities, let’s take the Sales invoice report as an example and configure a Print management setup for it.
Configure Print management tracing
We should first enable Print management tracing. We do it on the Trace parameters form implemented by Docentric, accessible through the DocTraceParam menu item. For that, we will use the following URL:
When we open this form for the first time, it’ll be empty. We need to add a new record and enter the following values:
- Parameter name: PRINTMGMT
- Parameter value: Enable
Save the record, and tracing of Print management is enabled.
At the same time, it’s helpful to trace Docentric report execution settings, such as target print destination, selected template, report parameters, etc. For that, we add another record with the following values:
- Parameter name: DOCENTRIC
- Parameter value: Enable
By saving the record, we have successfully configured the complete tracing for Print management. How easy was that!
A very complicated Print management setup
I will intentionally use a complex Print management setup to demonstrate the tracing feature. I’ll configure it for Sales invoice with Original and two Copy settings on the Module level. Next, I will configure overrides for the Original and Copy settings on the Account and Document levels.
Tracing to Infolog
We can have the tracing result displayed in the Infolog. I’ll enable it by navigating to the Trace parameters table and entering TraceToInfolog as a Parameter name and Enable as a Parameter value.
When I print the Sales invoice report on which I have implemented the Document level override, I can see the tracing output in the Infolog:
For better readability, I’ll repeat the above info message here:
PRINTMGMT ON_PRINTMGMT_LOAD***SalesInvoice.Report | Original | Document override (Sales orders) | Default *** SalesInvoice.Report | Copy (Copy #1 – Customer invoice) | Document override (Sales orders) | Default *** SalesInvoice.Report | Copy (Copy #2 – Customer invoice) | Document override (Sales orders) | Default
We can see that Original, Copy #1 – Customer invoice, and Copy #2 – Customer invoice were printed. Additionally, we can also see that on all of them, Document overrides kicked in.
Imagine not knowing about Document level overrides on this particular Sales invoice and wondering why it didn’t print to the print destination configured on the Module level in Print management. Tracing is a time saver that also gives you relevant information about executed reports.
Tracing to Database
When we want more detailed tracing information or we want to trace report execution in batch, we need to configure tracing to the database. We created a dedicated table used for tracing – DocTraceTable. I will configure this tracing destination in the same way as I have configured tracing to Infolog. First, I navigate to the Trace parameters form, then I enter TraceToDatabase as a Parameter name and Enable as a Parameter value.
Remember the Account level override in Print management settings? I will now select a different Sales invoice from the one having override and print it using Print management.
I will open the DocTraceTable in a table browser to view the output traced to the database.
We can see the information about the printed report in the Messages column for the PRINTMGMT Trace category record. I will again share the entire message here:
SalesInvoice.Report | Original | Account override (Customers: US-002) | Default *** SalesInvoice.Report | Copy (Copy #1 – Customer invoice) | Account override (Customers: US-002) | Default *** SalesInvoice.Report | Copy (Copy #2 – Customer invoice) | Account override (Customers: US-002) | Default
We can see that Original, Copy #1 – Customer invoice, and Copy #2 – Customer invoice were printed, and we can also see that Account level overrides kicked in on all printed documents.
Apart from the Messages column, the DocTraceTable provides additional tracing information through TraceContextInfo columns.
The TraceContextInfo columns will give us information about the print destination, eventual error messages, whether the execution was successful, used template, report parameters, etc.
When faced with unexpected results while printing reports using Print management, we need a tool that will help us figure out why. Tracing implemented by Docentric Free Edition provides information on any override, conditional or copy setting in our Print management setup.
Docentric currently supports Infolog and Database as tracing targets (destinations), whereas tracing to Infolog is handy to quickly examine the loaded Print management settings in less detail when a report is not executed in batch. On the other hand, tracing to Database is the only option when we want to trace report execution in batch and additionally, it brings more detailed trace information.
Once in the future, we will introduce new tracing targets such as Azure Blob storage. It’s worth mentioning that we use AppInsights for telemetry and diagnostics purposes to monitor and analyze the performance, behavior and issues related to reports executed with Docentric, and we also plan to support the same functionality for customers’ AppInsights. So stay tuned 😊
How Print management settings are stored in the database in D365FO >>
D365FO Print Management settings per module >>
Getting all D365FO Print Management settings in Excel >>
Modify Print management settings in bulk in D365FO >>