Dim g As New GroupTableBuilder("月员工统计查询", DataTables("进厂员工花名册"))g.Groups.AddDef("所属部门", "", "部门")g.Totals.AddDef("工号", AggregateEnum.Count,"3月")g.VerticalTotal = Trueg.SubTotal = Trueg.Filter = "[员工状态] = '在职' and [入职日期] <= #3/24/2017#"Tables("主窗口_table1").datasource = g.BuildDataSource