Interview Questions

Monday, May 12, 2014

AX 2012 SSRS RDP Class

[SRSReportQueryAttribute(querystr(CustTransQuery))]
 public class CustTransdemoDP extends SRSReportDataProviderBase
 {
 CustTransDemoTmp custTransDemoTmp;
 CustTable custTable;
 CustTrans custTrans;
 AmountCur amountCur;
 Voucher voucher;
 CustGroupId custGroup;
 TransDate transDate;
 }
 =================
 [SRSReportDataSetAttribute(tableStr(CustTransDemoTmp))]
 private CustTransDemoTmp getCustTransTmp()
 {
 select custTransDemoTmp;
 return custTransDemoTmp;
 }
 ======================
 private void inserrtIntoCustTransTmp()
 {
 custTransDemoTmp.CustGroup = custTable.CustGroup;
 custTransDemoTmp.AmountCur = custTrans.AmountCur;
 custTransDemoTmp.Voucher = custTrans.Voucher;
 custTransDemoTmp.TransDate = custTrans.TransDate;
 custTransDemoTmp.insert();
 }
 =======================
 [SysEntryPointAttribute]
 public void processReport()
 {
 QueryRun queryRun;
 queryRun = new QueryRun(this.parmQuery());
 while (queryRun.next())
 {
 custTable = queryRun.get(tablenum(CustTable));
 custTrans = queryRun.get(tablenum(CustTrans));
 amountCur = custTrans.AmountCur;
 voucher = custTrans.Voucher;
 custGroup = custTable.CustGroup;
 transDate = custTrans.TransDate;
 this.inserrtIntoCustTransTmp();
 }
 }

No comments:

Post a Comment