How to sum nested list with filter as below
How to sum nested list with filter as below
please help me correct to sum data on footer of table.
- Attachments
-
- 2024-08-21_195752.jpg (137.76 KiB) Viewed 3428 times
-
- 2024-08-21_195351.jpg (212.69 KiB) Viewed 3428 times
Re: How to sum nested list with filter as below
currently expression, but incorrect.
- Attachments
-
- 2024-08-22_090119.jpg (183.45 KiB) Viewed 3408 times
Re: How to sum nested list with filter as below
or try expression as below result same incorrect.
- Attachments
-
- 2024-08-22_100602.jpg (111.22 KiB) Viewed 3403 times
-
- 2024-08-22_100523.jpg (171.37 KiB) Viewed 3403 times
-
- Posts: 7333
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to sum nested list with filter as below
Hello,
Please check the following link:
https://www.stimulsoft.com/en/documenta ... ands_2.htm
Thank you.
Please check the following link:
https://www.stimulsoft.com/en/documenta ... ands_2.htm
Thank you.
Re: How to sum nested list with filter as below
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);
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);
- Attachments
-
- ReportTest.mrt
- (172.99 KiB) Downloaded 257 times
-
- 2024-08-23_154455.jpg (89.24 KiB) Viewed 3317 times
-
- Posts: 7333
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to sum nested list with filter as below
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.
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.