AX / D365FO – Add a custom report design under Print management in AX 2012

Below are the steps to be followed :

  • Create new Design for Report under visual studio
  • Add code to method:
    \Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate
    Add code before TTSCOMMIT:
    addOther(PrintMgmtDocumentType::PurchaseOrderInvoice, ssrsReportStr(VendInvoiceDocument, MyReport), ssrsReportStr(VendInvoiceDocument, MyReport), #NoCountryRegionId);
  • Choose you new format under:
    AP -> setup -> form setup -> Print management -> Vendor invoice -> report format to VendInvoiceDocument.MyReport
  • New Report design can be executed from use Print management from Inquiry journal forms or during posting by selecting Print management destination.
  • (Optional)
    In case: the report still keep original design, add this code to class VendInvoiceDocumentController in method outputReport or Main:
    //original menu item or your new menu item
    if(args.menuItemName() == menuitemOutputStr(MyReportMenuItem))
    formLetterReport.getCurrentPrintSetting().parmReportFormatName(ssrsReportStr( VendInvoiceDocument,MyReport));

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s