Interview Questions

Tuesday, August 15, 2017

Add custom parameter in SSRS report through RDP class in AX 2012 R3

This is very simple step:
//*ABC is field name

1- Declare field in class declaration of Contract class.
Sample:
ABC                 abc;

2- Add method in Contract class.
Sample:
[DataMemberAttribute('ABC')]
public "ExtendedDataType name of the field" parmABC(ABC_abc = abc)
{
    abc= _abc;
    return abc;
}

3- Declare object in class declaration of DP class
Sample:
ABC            abc;


4- Pass reference for this parm method in DP class.
Sample:
before starting query(Select or while select statement), write below line of code-
abc= rdpContract.parmABC();
//In this line "rdpContract" is a variable of your contract class which you need to declare.

and then use this "abc" value in ur query (select or while select statement).

Task done.

No comments:

Post a Comment