Dim g As New CrossTableBuilder("客服数据", DataTables("询盘表"))
Dim g1 As fxDataSource
g.HGroups.AddDef("询盘时间", "月")
g.HGroups.AddDef("地区")
g.VGroups.AddDef("客服")
g.Totals.AddDef("编号", AggregateEnum.Count, "总询盘")
g.Totals.AddDef("有效", "有效")
g.Filter = "([地区]='株洲'or [地区]='长沙'or [地区]='湘潭'or [地区]='衡阳') and ([客服]<>'Null ')"
g1 = g.BuildDataSource()
Dim ggk As New CrossTableBuilder("客服上门月数据", DataTables("上门表"))
Dim ggk1 As fxDataSource
ggk.HGroups.AddDef("上门日期", "月")
ggk.HGroups.AddDef("地区")
ggk.VGroups.AddDef("客服", "{0}_上门")
ggk.Totals.AddDef("上门日期", AggregateEnum.Count, "上门日期")
ggk.Filter = "([地区]='株洲'or [地区]='长沙'or [地区]='湘潭'or [地区]='衡阳') and ([客服]<>'Null ')"
ggk1 = ggk.BuildDataSource()
Dim ggkk As New CrossTableBuilder("客服交定月数据", DataTables("交定表"))
Dim ggkk1 As fxDataSource
ggkk.HGroups.AddDef("交定日期", "月")
ggkk.HGroups.AddDef("地区")
ggkk.VGroups.AddDef("客服", "{0}_交定")
ggkk.Totals.AddDef("交定日期", AggregateEnum.Count, "交定日期")
ggkk.Filter = "([地区]='株洲'or [地区]='长沙'or [地区]='湘潭'or [地区]='衡阳') and ([客服]<>'Null ')"
ggkk1 = ggkk.BuildDataSource()
Dim ggkkk As New CrossTableBuilder("客服施工月数据", DataTables("施工表"))
Dim ggkkk1 As fxDataSource
ggkkk.HGroups.AddDef("施工日期", "月")
ggkkk.HGroups.AddDef("地区")
ggkkk.VGroups.AddDef("客服", "{0}_施工")
ggkkk.Totals.AddDef("施工日期", AggregateEnum.Count, "施工日期")
ggkkk.Filter = "([地区]='株洲'or [地区]='长沙'or [地区]='湘潭'or [地区]='衡阳') and ([客服]<>'Null ')"
ggkkk1 = ggkkk.BuildDataSource()
g1.Combine("月",ggk1,"月") '将销售统计数据组合到进货统计数据
g1.Combine("月",ggkk1,"月") '将销售统计数据组合到进货统计数据
g1.Combine("月",ggkkk1,"月") '将销售统计数据组合到进货统计数据
g1.Show("客服数据") '显示统计结果
MainTable = Tables("客服数据")