How to populate enum type field at report dailog level in ax 2012

Hi …I have one requirement of my client .

Whenever we will open the report

Inventory management >>reports>>status>>inventory value report .

I need filter at report dailog (this field is custom field with enum type i.e Marketing type

1.direct

2.indirect )

I want populate this field at dailog level .

Above filed add at item master level (i.e inventtable ).

I want know how write code for parmmethod for enum type(marketingtype) field in UI builder class

Have you tried by adding it to the contract? \Classes\InventValueReportContract

Hi Kranthi , thanks for the reply.

finally I added a field at Dialog . Now i am getting field at dialog level.[:O]

Now I have another challenge[:(] . whenever i will select the dropdown (i.e Marketing type =direct/indirect )

if I Select the direct in the drop down at dialog level then in the report i want add one column with name Marketing type . in the that column should show direct . if select the indirect in the dropdown, then in the report it should show indirect.

please suggest me how to achieve this this requirement .

shall i add a field ( i.e Marketing type )at InventValueReportTmpLine or how to achieve it ? please give me steps

below code i added contract class and ui builder class to get enum type filed at report dialog 6114.Capture.PNG

[
DataMemberAttribute(‘PwC_MarketingType’),
//SysOperationGroupMemberAttribute(‘IdentificationGroup’),
SysOperationLabelAttribute(literalStr("@SJS69"))
]

public MarketingType parmMarketingType(MarketingType _MarketingType = marketingType)
{
MarketingType = _MarketingType;
return MarketingType;
}

public void build()
{
super();

reportIdField = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(InventValueReportContract, parmReportId));
dateCodeField = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(InventValueReportContract, parmDateInterval));
fromDateField = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(InventValueReportContract, parmFromDate));
toDateField = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(InventValueReportContract, parmToDate));
MarketingType=this.bindInfo().getDialogField(this.dataContractObject(),methodStr(InventValueReportContract,parmMarketingType));
}

If you want to add the field to the report, try adding the field to InventValueReportTmpLine and you can update it in below methods,

\Classes\InventValueReportPopulateItem\findReportLine

\Classes\InventValueReportDP\getInventValueReportTmpLine

If you want to filter the items based on the selected type, try adding your logic to

\Classes\InventValueReportPopulateItem\buildTransactionsWithDynamicQuery

thanks once again for reply .
can u tell me the logic how filter the items based on selected type ?

buildTransactionsWithDynamicQuery - In this method the InventTable data source is added to the query. You need to add a range on your field from inventTable (Marketing type) and the assign the value (using the contract).