List<ReportDataInfo> Lrdi = new List<ReportDataInfo>();
ReportDataInfo rdi = new ReportDataInfo();
ReportDataInfo RdiMerge=new ReportDataInfo();
string[] AccountTypeCodeCustomArray =
AccountCodeTypeCustom.Split(",".ToCharArray());
string[] SubTypeCodeCustomArray =
SubAccountTypeCodeCustom.Split(",".ToCharArray());
string[] AccountCodeCustomArray = AccountCodeCustom.Split(",".ToCharArray());
for (int i = 0; i < AccountCodeTypeCustom.Length; i++)
{
rdi = ExportDataToCSV.GetLedgerReportData(Globals.GetInt(
AccountTypeCodeCustomArray[i],0),Globals.GetInt(
SubTypeCodeCustomArray[i],0),Globals.GetInt( AccountCodeCustomArray[i],0),
this.CurrentSessionInfo.Company.CompanyCode,
this.CurrentSessionInfo.FinancialYear.StartDate,
this.CurrentSessionInfo.FinancialYear.EndDate);
RdiMerge.Rows.Concat(rdi.Rows);
}
CurrentSessionInfo.ReportData = RdiMerge;
This is what I tried before
Now my question is: I want the merge to be returned ReportDataInfo from ExportDataToCSV.GetLedgerReportData ();
I am stuck here with any values ββreturned from ExportDataToCSV.GetLedgerReportData (); I want to merge into one ReportDataInfo , and then go to CurrentSessionInfo.ReportData = RdiMerge;
ReportDataInfolooks like
[Serializable]
public class ReportDataInfo
{
public string ReportHeading { get; set; }
public List<ReportColumnInfo> Rows { get; set; }
}
source
share