Old pattern/usage | New programming model pattern |
RDP report with:1. Simple Grouping
2. Validation |
– Create RDP contract.- Implement SysOperationValidatable and implement validation.
– Do grouping on contract.
Example: – AssetDepreciationLedger_IT – InventABC |
RDP report with complex grouping e.g. horizontal, vertical, nesting etc. OR multiple groups etc. | – Do grouping in VS. Provides you modeling capabilities. |
Query/DataMethod/OLAP report with group | – Do grouping in VS. |
– Custom fields created in dialog i.e. field is not a report parameter- Field added based on certain condition.
– Custom dialog fields are added and report parameter populated based on that. |
– Create UI Builder:- Move code in “addCustomCtrl” to UIBuilder.build().
– Move “getFromDialog” to UIBUilder.getFromDialog() and populate contract. – Associate UI builder class with contract by using attribute “SysOperationContractProcessingAttribute(classstr(UIBuilderName), SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly)” – Optional: Create controller, if further modification of contract needs to be done before running. Do it in preRunModifyContract(). – Example: – AgreementFollowup – BOMPartOf |
– Code needs to react to dialog field events. E.g. field modified etc. | – Create UI Builder:- In postRun(), register override methods for field events and associate with methods.
– Example: – BudgetFundsAvailableUIBuilder BudgetDetailsUIBuilder |
– Dialog field needs to be changed to have different button type than default- Field needs to turn on flag on grouping. | – Create UI Builder:- In postBuild(), get the dialog field from binding info and change.
Example – BudgetDetailsUIBuilder |
– Helper class turns on/off visibility of report parameter, so new custom parameters can be added. | – Change the report parameter in report design to hidden. Framework will take care of not showing it on AX form. |
– Helper class add caption for the report. | – This should be avoided. The framework will use the label on the menu item launching the report as caption. So please change the label on menu item.- The above will cover most reporting scenario.
– For case where same report is used in multiple reports, then override controller.prePromptModifyContract() and set this. parmDialogCaption().
Example – AgreementFollowUpController |
– Enable/Disable a dialog field based on certain condition | – Create UI builder:- Override getFromDialog() if you want to get custom field value from dialog.
– Override postBuild(), to enable/disable fields. Example: – CustAccountStatementInt
|
– Query is modified based on caller args BEFORE UI is rendered. | – Create controller:Override prePromptModifyContract().
Example – AgreementFollowUpController |
– Query is modified BEFORE report is run. | – Create controller:Override preRunModifyContract() |
– Report name is changed based on caller args or UI parameter | – Create controller:Override preRunModifyContract()
Example: – AgreementFollowUpController |
– Helper class uses Print management | – Create controller:Override run() (refer to sample report)
Override preRunModifyContract(), prePromptModifyContract() as needed.
Example: – CustInterestNoteHelper |
– Report parameter UI should NOT show. | – Create controller:In main(), before controller.startOperation(), call controller.parmShowDialog(false) |
– Report uses temp table from caller | – Create controller- Get temp table from caller, and use SRSTmpTblMarshaller class to save the data
– Develop RDP class to extract this data and do biz logic processing
Example: – Cheque_US |