代码
Dim b As New SQLGroupTableBuilder("统计表1","登记")
b.ConnectionName= "sl"
b.AddTable("登记","批次","计划","批次") '添加统计表
b.AddTable("登记","工序码","工序表","工序码") '添加统计表
b.Groups.AddDef("{登记}.批次")
b.Groups.AddDef("零件名称")
b.Groups.AddDef("工序名称")
b.Totals.AddDef("{登记}.数量") '对数量进行统计
b.Totals.AddExp("金额","{登记}.数量 * 单价")
b.Build '生成统计表