Dim g1 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt1 As fxDataSource
g1.Groups.AddDef("财务结算年月")
g1.Groups.AddDef("泵车信息_编号")
g1.Groups.AddDef("泵车筛选", "车辆编号及车牌号")
g1.Totals.AddDef("砼方量_签单", "车辆作业方量_签单")
g1.Totals.AddDef("砼方量_补方", "车辆作业方量_补方")
g1.Totals.AddDef("砼方量_合计", "车辆作业方量_合计")
g1.VerticalTotal = True
g1.Filter = "[财务结算年月] = 201905 and [泵车信息_编号] < 100"
dt1 = g1.BuildDataSource()
Dim g2 As New GroupTableBuilder("统计表1", DataTables("泵人档案"))
Dim dt2 As fxDataSource
g2.Groups.AddDef("泵工数据统计_年月", "泵工考勤统计_年月")
g2.Groups.AddDef("泵工数据统计_编号", "泵工考勤统计_编号")
g2.Groups.AddDef("泵工数据统计_人员", "泵工工资明细_姓名")
g2.Totals.AddDef("泵工数据统计_基础工资", "泵工工资明细_基础工资")
g2.Totals.AddDef("泵工数据统计_出勤", "泵工工资明细_出勤")
g2.Filter = "[泵工数据统计_年月] = 201905"
dt2 = g2.BuildDataSource()
Dim g3 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt3 As fxDataSource
g3.Groups.AddDef("财务结算年月")
g3.Groups.AddDef("作业人员_1", "泵工工资明细_姓名")
g3.Totals.AddDef("泵工方量分配_分配", "泵工工资明细_作业方量")
g3.VerticalTotal = True
g3.Filter = "[财务结算年月] = 201905 and [作业人员_1] is not null"
dt3 = g3.BuildDataSource()
Dim g4 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt4 As fxDataSource
g4.Groups.AddDef("财务结算年月")
g4.Groups.AddDef("作业人员_2", "泵工工资明细_姓名")
g4.Totals.AddDef("泵工方量分配_分配", "泵工工资明细_作业方量")
g4.VerticalTotal = True
g4.Filter = "[财务结算年月] = 201905 and [作业人员_2] is not null"
dt4 = g4.BuildDataSource()
Dim g5 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt5 As fxDataSource
g5.Groups.AddDef("财务结算年月")
g5.Groups.AddDef("作业人员_3", "泵工工资明细_姓名")
g5.Totals.AddDef("泵工方量分配_分配", "泵工工资明细_作业方量")
g5.VerticalTotal = True
g5.Filter = "[财务结算年月] = 201905 and [作业人员_3] is not null"
dt5 = g5.BuildDataSource()
Dim g6 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt6 As fxDataSource
g6.Groups.AddDef("财务结算年月")
g6.Groups.AddDef("作业人员_4", "泵工工资明细_姓名")
g6.Totals.AddDef("泵工方量分配_分配", "泵工工资明细_作业方量")
g6.VerticalTotal = True
g6.Filter = "[财务结算年月] = 201905 and [作业人员_4] is not null"
dt6 = g6.BuildDataSource()
Dim g7 As New GroupTableBuilder("统计表1", DataTables("泵送明细"))
Dim dt7 As fxDataSource
g7.Groups.AddDef("财务结算年月")
g7.Groups.AddDef("作业人员_5", "泵工工资明细_姓名")
g7.Totals.AddDef("泵工方量分配_分配", "泵工工资明细_作业方量")
g7.VerticalTotal = True
g7.Filter = "[财务结算年月] = 201905 and [作业人员_5] is not null"
dt7 = g7.BuildDataSource()
Dim nms1 As String() = {"财务结算年月"}
Dim nms2 As String() = {"泵工考勤统计_年月"}
Dim nms3 As String() = {"财务结算年月"}
Dim nms4 As String() = {"财务结算年月"}
Dim nms5 As String() = {"财务结算年月"}
Dim nms6 As String() = {"财务结算年月"}
Dim nms7 As String() = {"财务结算年月"}
dt1.Combine(nms1,dt2,nms2)
dt1.Combine(nms1,dt3,nms3)
dt1.Combine(nms1,dt4,nms4)
dt1.Combine(nms1,dt5,nms5)
dt1.Combine(nms1,dt6,nms6)
dt1.Combine(nms1,dt7,nms7)
Tables("泵送明细_Table6").DataSource = dt1