呃,
Dim g As New CrossTableBuilder("统计表1", DataTables("加班窗口_table1"))
g.HGroups.AddDef("日期", DateGroupEnum.Year, "年度")
g.HGroups.AddDef("日期", "月份")
g.HGroups.AddDef("加班内容", "处理过程")
g.VGroups.AddDef("接诊医生", "{0}_接诊人数")
g.Totals.AddDef("病人姓名", AggregateEnum.Count, "病人姓名")
g.HorizontalTotal = True
g.VerticalTotal = True
g.Filter = "[病人姓名] Is not null And [接诊时间] >= '" & new Date(1900,1,1,val1.Hour,val1.Minute,val1.Second) & "' And [接诊时间] <= '" & new Date(1900,1,1,val2.Hour,val2.Minute,val2.Second) & "'"
[此贴子已经被作者于2015/7/2 16:51:55编辑过]