0
votes

I've added a new report design to the Sales Quotation report (AX2012).

The only way I could get the design to print out was to either amend the Standard Report Design or amend the Class SalesFormLetterReport_Quotation and change the Report Name in method getDefaultPrintJobSettings to my new report design. This is because the Quotation report uses Print Management settings and always uses the default report design.

My question is, if I want to print a different design based on some data criteria, i.e. a different customer type, how could I do this?

The only thing I can think of is to change the SalesFormLetterReport_Quotation class and override the method 'loadPrintSettings'.

I tried adding a new conditional setting in the Print Management setup but this still defaults to the default report design.

2

2 Answers

0
votes

Take a look at:

  • \Classes\PrintMgmtDocType\getDefaultReportFormat
  • \Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate
  • \Data Dictionary\Tables\SRSReportDeploymentSettings\Methods\populateTableWithDefault

These methods has all sorts of report layouts hard coded. Really nasty shit!

0
votes

To assign a different design based on customer, you can modify the Controller class which opens the SalesQuotation Report.

Edit the main method in SalesQuotationController class.

Write logic to assign the design based on your specific requirements.

You may edit the following lines on the SalesQuotationController\main method.

formLetterController.initArgs(_args, ssrsReportStr(SalesQuotation,Report));

enter image description here