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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...