Dim tjb As String = "统计表1"
Dim b As New SQLGroupTableBuilder(tjb,"表A")
b.Groups.AddExp("日期","CDate(日期)")
b.Totals.AddExp("表A_接单量","1")
b.Totals.AddExp("表A_已处理数量","iif(是否解决=true,1,0)")
b.Totals.AddExp("表A_未处理数量","iif(是否解决=true,0,1)")
'b.Build
Dim d As fxDataSource = b.BuildDataSource()
Dim bms As String = "表B|表C|表D"
For Each bm As String In bms.split("|")
Dim b1 As New SQLGroupTableBuilder(tjb,bm)
b1.Groups.AddExp("日期","CDate(日期)")
b1.Totals.AddExp(bm & "_接单量","1")
b1.Totals.AddExp(bm & "_已处理数量","iif(是否解决=true,1,0)")
b1.Totals.AddExp(bm & "_未处理数量","iif(是否解决=true,0,1)")
'b1.Build
Dim d1 As fxDataSource = b1.BuildDataSource()
d.Combine("日期",d1,"日期")
Next
d.Show(tjb)
MainTable = Tables(tjb) '打开生成的统计表"