The sample code below shows how to retrieve DataSet of Debtor Statement.
publicSystem.Data.DataSetGetDebtorStatement(BCE.Data.DBSettingdbSetting){BCE.AutoCount.ARAP.DebtorStatement.DebtorStatementstatement=BCE.AutoCount.ARAP.DebtorStatement.DebtorStatement.Create(dbSetting);BCE.AutoCount.ARAP.DebtorStatement.DebtorStatementCriteriacrit=newBCE.AutoCount.ARAP.DebtorStatement.DebtorStatementCriteria();//Set filter by date rangecrit.FromDate=newDateTime(2018,10,1);crit.ToDate=newDateTime(2018,10,31);//Load statement datastatement.Inquire(crit);returnstatement.ResultDataSet;}
Export Debtor Statement to PDF
This sample uses class of DebtorStatement and method of ExportReportByName to generate PDF File.
//filepath = @"C:\Temp\MyExportName.pdf"publicvoidExportToPdfByDebtor(stringdebtorCode,stringfilepath,BCE.Data.DBSettingdbSetting){BCE.AutoCount.ARAP.DebtorStatement.DebtorStatementstatement=BCE.AutoCount.ARAP.DebtorStatement.DebtorStatement.Create(dbSetting);BCE.AutoCount.ARAP.DebtorStatement.DebtorStatementCriteriacrit=newBCE.AutoCount.ARAP.DebtorStatement.DebtorStatementCriteria();BCE.AutoCount.ReportFilter.StringFilterfilterDebtor=newBCE.AutoCount.ReportFilter.StringFilter();//Set filter by date rangecrit.FromDate=newDateTime(2018,10,1);crit.ToDate=newDateTime(2018,10,31);//Only one debtor in one document.filterDebtor.ByOne(debtorCode);crit.DebtorFilter=filterDebtor;//Load statement datastatement.Inquire(crit);//Export to PDF//"Debtor Statement" is the name of the Report TemplateBCE.AutoCount.Report.ReportTool.ExportReportByName("Debtor Statement",statement.GetReportDataSource(),dbSetting,newBCE.AutoCount.BasicReportOption(),newBCE.AutoCount.Report.ReportInfo("","","",""),filepath,BCE.AutoCount.Report.ExportFormat.Pdf);}