Example: Create a Report with a Group Check Box [AX 2012]

Updated: April 30, 2014

Applies To: Microsoft Dynamics AX 2012 R3

The following example provides information about how the BOMPartOf report was converted to use the current report programming model. This report provides an example of a report that requires a group check box in the UI.

  • The BOMPartOf report was migrated to the current report programming model.

  • An RDP contract was created.

  • The UI builder was used together with overrides so that the UI includes a group check box.

Before the conversion, the helper class did the following:

  • Add the fields to the dialog box.

  • Get the fields from the dialog box.

  • Set the report parameters.

  • Provide the grouping.

To see the full implementation, in the development workspace, click AOT > Classes > BOMPartOfUIBuilder. The following code illustrates how to create a form group control, and how to use the control in the build method, the getFromDialog method, and the getSearchIntervalFromDialog method.

public void build() 
{ 
    FormBuildGroupControl formBuildGroupControl; 
    super(); 
    formBuildGroupControl = this.dialog().curFormGroup(); 
    formBuildGroupControl.columns(2); 
} 
public void getFromDialog() 
{ 
    super(); 
    this.getSearchIntervalFromDialog(this.dialog()); 
} 
protected void getSearchIntervalFromDialog(Dialog _dialog) 
{ 
    BOMPartOfContract contract = this.dataContractObject(); 
    FormGroupControl dialogSearchIntervalGroup = _dialog.formRun().control(_dialog.formRun().controlId('Date')); 
    contract.parmSearchInterval(dialogSearchIntervalGroup.optionValue()); 
}

The following code illustrates the contract for the BOMPartOf report.

[ 
    DataContractAttribute, 
    SysOperationContractProcessingAttribute(classstr(BOMPartOfUIBuilder),     
SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly), 
    SysOperationGroupAttribute('Date', "@SYS25853", '4'), 
    SysOperationGroupAttribute('ViewGroup', "@SYS5252", '5') 
] 
public class BomPartOfContract 
{ 
...

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: