Improved Print Archive
Built-in Print archive
When printing reports you can choose to archive them at the same time. Such reports are saved to Organization administration > Inquiries and reports > Print archive.
Built-in Print archive is pretty limited – you can search reports only by their caption and view them as PDF. It has the following features:
- The Type field: always set to SQL Server Reporting Services report (probably the matter of legacy)
- The Description field: set to the report caption, which is the caption of the report menu item, e.g. Show invoice for the Customer Invoice report; or set to the report ID, e.g. Report.
- Couple of additional fields: Date and time of the report creation, user which created the report, number of pages is always set to 0 except when the report was printed to a printer
- The Print preview button: download and view printed reports as PDF files
Improved Print archive
From the version 3.3.0 Docentric improves built-in Print archive by adding some interesting features such as:
- Instant document preview (from version 3.4.5).
- View executed reports' print destination settings, e.g. an email message sent to a customer primary contact.
- Use dynamic placeholders to control what is written into the Description field; the Type field in the grid is hidden.
- Bring relations to a source table (e.g. sales/purchase order), a journal table (e.g. invoice journal), a customer or vendor, etc.
- Search by report name, document ID (e.g. Invoice ID), source table ID (e.g. Sales/Purchase ID), Customer/Vendor account number, etc. You can also navigate to these entities by clicking the related fields in the form.
- Download zipped, merged or encrypted report files.
- Configure Document type for archiving per company, report and report execution. Learn more >>
- Search by report parameters and Print archive note, which can be configured per report execution. Learn more >>
- Open Print archive from Customer and Vendor cards. Learn more >>
- Access Print archive from common journals. Learn more >>
Instant document preview
In 3.4.5 version we have added a document preview window to Print archive so you can now view the archived reports while browsing through Print archive without having to download them. The preview window can be toggled on or off via the Hide/Show preview button, to allow for more columns to be shown as needed.
The built-in Print preview button is now hidden, however downloading one or more archived report files is possible via the Download button added by Docentric.
View report print destination settings
Viewing of an executed report's print destination settings works out-of-the-box for any report saved to Print archive.
Download email message
If an archived report was emailed, you can also download and view the sent email message.
Download zipped, merged or encrypted files
You can download single or multiple archived reports, zipped or merged into a single PDF document. Moreover, you can download archived reports printed in file format different from PDF. You can also download reports encrypted with passwords, if they were printed with PDF security applied.
Populate Print archive with report metadata
How to fill Docentric archive contract
If you are not using DSP classes from the Docentric AX SSRS Replicas model or you just want to fill up Docentric archive contract for a report which is part of this model, the procedure is very simple.
public DocPlaceholderManager overrideReportRunSettings(DocReportRunContext _reportRunContext, boolean _replaceStandardPlaceholders = true)
// Replace standard placeholders.
DocPlaceholderManager placeholderMng = super(_reportRunContext, _replaceStandardPlaceholders);
// Replace custom placeholders:
// -- Placeholder @InvoiceId@
// Fill the Print archive contract.
This is a code snippet from Customer Invoice’s DSP class that should be adjusted to cover your scenario.
Description field in Print Archive
The Description field is automatically set up to the report caption.
Report caption is by default overtaken from SSRS framework and this is most of the time a caption of the report menu item. Sometimes, this is not provided and the report ID, i.e. report technical name, i.e. report name in AOT is used instead.
You can change the report caption in the report DSP class in X++, but starting from the version 3.3.0 you can change report caption without coding, by entering the report caption in Docentric report setup. You can even use placeholders to make it dynamic. Learn more about setting up a report caption >>
File name when previewing/downloading report
From the version 3.3.0 when you preview, i.e. download a report from Print archive, the downloaded report filename will be the same as the Description field (i.e. the report caption) of the report in Print archive.
From the version 3.4.5 the built-in Print preview button is hidden - it became redundant because of the new feature Instant document preview. However, the archived report files downloaded via the Download button still use the Description field as the filename.
[SubscribesTo(classStr(DocReportRunDelegates), delegateStr(DocReportRunDelegates, saveToPrintArchive))]
public static void DocReportRunDelegates_saveToPrintArchive(DocPrintJobHeader _printJobHeader, DocReportPrintArchiveInfo _printArchiveInfo, DocEventHandlerResult _result)
DocArchiveContract ac = _printArchiveInfo.getArchiveContract();
DocPrintReportSettings reportSettings = _printArchiveInfo.parmPrintReportSettings();
// You can use customSettings (a container) from reportSettings which can
// be set in the overrideReporRunSettings() method of the report DSP class.
container customSettings = reportSettings.parmCustomSettings();
str reportDescription = conPeek(customSettings, 1);
// Update the built-in table for Print archive.
select firstonly forupdate pjh where pjh.RecId == _printJobHeader.PrintJobHeaderRecId;
pjh.jobDescription = reportDescription;
// Set the values of fields of Docentric's table for Print archive.
// Commiting the update of this table will take place after this method completes.
_printJobHeader.AccountRole = DocAccountRole::Customer;
_printJobHeader.AccountNum = 'US-001';
Saving reports to DMS
[SubscribesTo(classStr(DocReportRunDelegates), delegateStr(DocReportRunDelegates, beforeSaveToPrintArchive))]
public static void DocReportRunDelegates_beforeSaveToPrintArchive(
container _reportContent, SRSPrintArchiveContract _archiveContract, DocReportPrintArchiveInfo _printArchiveInfo, DocEventHandlerResult _result)
str reportId = _printArchiveInfo.parmPrintReportSettings().parmReportId();
if (reportId == ssrsReportStr(CustAccountStatementExt, Report))
str accountNum = _printArchiveInfo.getArchiveContract().parmAccountNum();
// Do something with _reportContent, a PDF file, e.g. save it to DMS.
// Cancel saving to Print Archive if needed.
Print Archive Document Types >>
Print Archive per Customer and Vendor >>
Print Archive Saving Settings >>
Access Print Archive from Common Journals >>
Improved Print Archive Blog Article >>
Download SSRS Report Docentric Replicas >>
- Built-in Print archive
- Improved Print archive
- Instant document preview
- View report print destination settings
- Download email message
- Download zipped, merged or encrypted files
- Populate Print archive with report metadata
- How to fill Docentric archive contract
- Description field in Print Archive
- File name when previewing/downloading report
- X++ Hooks
- Saving reports to DMS
- See also