How to add multiple report design under Print management in AX 2012

If you have new formats for Sales/Purchase/Quotation confirmation/Picking/Packing/Invoice..., following these steps :

Step1. Create new Design for report under visual studio
Step2. Add code to method:
\Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate
Add code  before TTSCOMMIT:
addOther(PrintMgmtDocumentType::SalesOrderPackingSlip, ssrsReportStr(SalesPackingSlipReportUD), ssrsReportStr(SalesPackingSlipReportUD), #NoCountryRegionId);     
Step 3. Choose you new format under:
AR -> setup -> form setup -> Print management -> Sales order Packing slip original -> report format to  SalesPackingslip.ReportUD
Step 4.
New Report design can be executed from use Print management from Inquiry journal forms or during posting by selecting Print management destination.
Step 5. (Optional)
In case: the report still keep original design, add this code to class TradeDocumentReportController in method outputReport:
//original menu item or your new menu item
if(args.menuItemName() == menuitemOutputStr(SalesPackingSlipOriginal)) 
formLetterReport.getCurrentPrintSetting().parmReportFormatName(ssrsReportStr(SalesPackingSlipOriginal, ReportUD)); 

No comments:

Post a Comment