Friday, January 24, 2014

Creation RDP and Contract Class

DP CLASS

[SRSReportParameterAttribute(classstr

(SRSRDPCustTableContractClass))]
class SRSRDPClass extends SRSReportDataProviderBase
{
CustTemp custTemp;
}

[SRSReportDataSetAttribute("custTemp")]
public custTemp getcustTemp()
{
select * from custTemp;
return custTemp;
}

[SysEntryPointAttribute(false)]
public void processReport()
{
CustTable custTable;
SRSRDPCustTableContractClass

srsRDPCustTableContractClass;
AccountNum accountNum;

srsRDPCustTableContractClass = this.parmDataContract()

as srsRDPCustTableContractClass;
accountNum =

srsRDPCustTableContractClass.parmAccountNum();
  while select * from custTable where

custTable.AccountNum == accountNum
{
custTemp.AccountNum =

custTable.AccountNum;
custTemp.PriceGroup =

custTable.PriceGroup;
custTemp.Currency =

custTable.Currency;
custTemp.insert();
}
}
-----------------------------------------------------------------------

-------------------------------------------
CONTRACT CLASS

class SRSRDPCustTableContractClass
{
AccountNum accountNum;
}

[DataMemberAttribute("AccountNum")]
public AccountNum parmAccountNum(AccountNum

_accountNum = accountNum)
{
accountNum = _accountNum;
return accountNum;
}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...