≡ Menu

Dynamics Ax 2012 : Exploring the Radio buttons as a report parameter

It is common scenario in report development to use check boxes or radio button as parameter.  Any Boolean variable define at data contract class become check boxes at report dialog. But how we make radio button on report dialog. When we require radio button then it means we have more than two values and one value is required to select. For this purpose we have to create a new enum at AOT.   Let see we create a new base enum with Name Enum student.



Right click on EnumStudent and open property window and set Style property as Radio button





Now you have to create a new data contract class where we define parameter that will contain the selected value for enum.





public class StudentDataContacts


EnumStudent enumStudent;


[ DataMemberAttribute('Student By'),SysOperationLabelAttribute('Student By')

public EnumStudent parmStudent(EnumStudent _EnumStudent =

enumStudent )


enumStudent = _EnumStudent;

return enumStudent;


When we deploy the report and run from menu Item, Report dialog will be appear like as follow screenshot.
Report Dialog

Now questions is that how we used this radio button parameter.

At report level, we can use this radio button parameter for grouping or such other operations. It return string value. For example I used here to just display what value of radio button selected in report Expression as


We can use this parameter inside the Process report method of Data Provider class as

public void processreport()
EnumStudent _EnumStudent;
str _StudentType;
StudentDataContact _DataContact;

_DataContact = this.parmDataContract();

_EnumStudent= _DataContact.parmStudent();


_TempStudentList.Firstname ="Ali";

_TempStudentList.Firstname ="Raza";



Hope this helps.

{ 0 comments… add one }

Leave a Comment