Dim b As New SQLGroupTableBuilder("统计表1","证书和收费统计")
b.Groups.Adddef("送检人")
b.Totals.Addexp("已付款","iif(已付款 = True,样品份数 * 检测单价,0)")
b.Totals.Addexp("未付款","iif(已付款 <> True,样品份数 * 检测单价,0)")
b.Totals.Addexp("合计","样品份数 * 检测单价 ")
b.Build()
MainTable = Tables("统计表1")