Tuesday, April 26, 2016

Multiple designs in Print Mgmt

I had to attach a new design to the Product Receipt report (PurchPackingSlip) which would run through a new menu item.

I tried to override the design by checking the calling menu item in the controller class but it always seemed to be picking from Print Management setup. Then I came across this:

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(SalesPackingSlip, ReportUD), ssrsReportStr(SalesPackingSlip, ReportUD), #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));
}

Credits: http://axvuongbao.blogspot.in/2014/04/how-to-add-multiple-report-design-under.html

No comments:

Post a Comment