此主题相关图片如下:统计记录数失败.jpg
Dim b As New CrossTableBuilder("统计表1", DataTables("订单"))
b.HGroups.AddDef("客户")
b.VGroups.AddDef("日期", DateGroupEnum.Month, "{0}月")
Dim y As Integer = Date.Today.Year
Dim dt1 As New Date(y, 1, 1)
Dim dt2 As New Date(y, 12, 31)
b.Filter = "日期 >= #" & dt1 & "# And 日期 <= #" & dt2 & "#"
b.Totals.AddDef("客户", AggregateEnum.Count, "份数")
b.VerticalTotal = True
b.HorizontalTotal = True
Tables("统计记录数_Table1").DataSource = b.BuildDataSource()