Some of the document prints in the Dynamics Finance and Operations application have been configured as a part of the Print management framework.
The print management framework makes it possible that the design of a document print is configurable. However, this also restricts the configuration to be picked from the set of reports that are configured to be a part of the framework.
Hence, if a new design is being prepared for a document that needs to be configured in the document print management framework, then the following steps should be followed to register the new layout in the system.
Find the PrintMgmtDocType class and create a subscriber to the getDefaultReportFormatDelegate method.
class AFZPrintMgmtDocType_EventHandler { [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))] public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result) { switch (_docType) { case PrintMgmtDocumentType::SalesFreeTextInvoice: _result.result(ssrsReportStr(AFZFreeTextInvoice, Report)); break; case PrintMgmtDocumentType::SalesOrderInvoice: _result.result(ssrsReportStr(AFZSalesInvoice, Report)); break; } } }
There is a bug in the base system when a new DocType is registered in PrintManagement, the latest report registered becomes the default report.
The default report is printed when we use the Original Preview option in the journal prints.
If we wish to have a different report as the default report we can change the same from a backend table PrintMgmtReportFormat.
This table has a row for each DocumentType that has been registered in the system and for each documentType there would be only one row that marked as System. If we want to change the default report then we have to switch on the system column for that report layout.