Examples below shows how to retrieve DataSet or DataTable of Debtor Aging.
It filters result of:
Up to Today's date;
Debtor code range of "300-A001" and "300-C999";
and does not include debtor whom the balance is zero.
Aging DataSet
classARAging{privateUserSessionmyUserSession;publicARAging(UserSessionuserSession){myUserSession=userSession;}publicSystem.Data.DataSetGetDebtorAgingDataSet(){AutoCount.ARAP.DebtorAging.DebtorAgingaging=AutoCount.ARAP.DebtorAging.DebtorAging.Create(myUserSession);AutoCount.ARAP.DebtorAging.DebtorAgingCriteriacrit=newAutoCount.ARAP.DebtorAging.DebtorAgingCriteria();//There are many more criteria to filter the resultcrit.ReportDate=DateTime.Today.Date;crit.DebtorFilter.ByRange("300-A001","300-C999");crit.IncludeZeroBalance=false;//The return table is "Master"DataTabletblAging=aging.Inquire(crit);//DataSet consists of many tables, and "Master" tablereturnaging.ResultDataSet;//If only the master table is needed, programmer can return only DataTable of the master table//tblAging table and aging.ResultDataTable are the same//return tblAging;//return aging.ResultDataTable;}}
Tables in Aging DataSet
Aging Detail Table
publicSystem.Data.DataTableDebtorAgingTable(){AutoCount.ARAP.DebtorAging.DebtorAgingaging=AutoCount.ARAP.DebtorAging.DebtorAging.Create(myUserSession);AutoCount.ARAP.DebtorAging.DebtorAgingCriteriacrit=newAutoCount.ARAP.DebtorAging.DebtorAgingCriteria();//There are many more criteria to filter the resultcrit.ReportDate=DateTime.Today.Date;crit.DebtorFilter.ByRange("300-A001","300-C999");crit.IncludeZeroBalance=false;//The return table is "Master"DataTabletblAging=aging.Inquire(crit);returnaging.ResultDataSet.Tables["Detail"];}