插入两个日期输入框,分别用于输入起始日期和结束日期:
Dim dt1 As Date = e.Form.Controls("起始日期").ValueDim dt2 As Date = e.Form.Controls("结束日期").Value
Dim g As New GroupTableBuilder("统计表", DataTables("课程信息"))g.Groups.AddDef("培训时间", DateGroupEnum.Year, "年")g.Totals.AddDef("实际人数")g.Totals.AddDef("人天统计")g.Filter = "[培训时间] >= #" & dt1 & "# and [培训时间] <= #" & dt2 & "#"g.Build()MainTable = Tables("统计表")