Page 1 of 1
How to sum nested list with filter as below
Posted: Wed Aug 21, 2024 1:13 pm
by kornji
please help me correct to sum data on footer of table.
Re: How to sum nested list with filter as below
Posted: Thu Aug 22, 2024 2:04 am
by kornji
currently expression, but incorrect.
Re: How to sum nested list with filter as below
Posted: Thu Aug 22, 2024 3:08 am
by kornji
or try expression as below result same incorrect.
Re: How to sum nested list with filter as below
Posted: Thu Aug 22, 2024 7:02 am
by Lech Kulikowski
Re: How to sum nested list with filter as below
Posted: Fri Aug 23, 2024 8:52 am
by kornji
as your suggestion I can't find solution for my scenario or may I mistaken. please check information as below.
Business objects model & data:
class TestReportEmployee
{
public string EmpNo { get; set; }
public string EmpName { get; set; }
}
class TestReportWorktime
{
public DateTime WorkDate { get; set; }
public string Shift { get; set; }
public TimeSpan TotalWorkHours { get; set; }
}
class TestReportData
{
public TestReportEmployee Employee { get; set; }
public List<TestReportWorktime> WorktimeInfos { get; set; }
public TestReportData()
{
WorktimeInfos = new List<TestReportWorktime>();
}
}
class TestReportResultModel
{
public DateTime FromDate { get; set; }
public DateTime ToDate { get; set; }
public List<TestReportData> Data { get; set; }
public TestReportResultModel()
{
Data = new List<TestReportData>();
}
}
/*create sample data*/
var result = new TestReportResultModel();
result.FromDate = new DateTime(2024, 3, 1);
result.ToDate = new DateTime(2024, 3, 31);
result.Data.Add(new TestReportData()
{
Employee = new TestReportEmployee() { EmpNo = "T001", EmpName = "TEST01" },
WorktimeInfos = new List<TestReportWorktime>() {
new TestReportWorktime(){ Shift = "S1",
WorkDate = new DateTime(2024,3,1),
TotalWorkHours = new TimeSpan(8,30,0)
},
new TestReportWorktime(){ Shift = "S2",
WorkDate = new DateTime(2024,3,1),
TotalWorkHours = new TimeSpan(8,30,0)
}
}
});
result.Data.Add(new TestReportData()
{
Employee = new TestReportEmployee() { EmpNo = "T002", EmpName = "TEST02" },
WorktimeInfos = new List<TestReportWorktime>() {
new TestReportWorktime(){ Shift = "S1",
WorkDate = new DateTime(2024,3,1),
TotalWorkHours = new TimeSpan(8,30,0)
},
new TestReportWorktime(){ Shift = "S2",
WorkDate = new DateTime(2024,3,2),
TotalWorkHours = new TimeSpan(8,30,0)
}
}
});
report.RegBusinessObject("ReportData", result);
Re: How to sum nested list with filter as below
Posted: Tue Aug 27, 2024 10:28 pm
by Lech Kulikowski
Hello,
We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.
Thank you.