Dim b As New SQLGroupTableBuilder("汇总统计","销售订单明细")b.AddTable("销售订单明细","销售单号","销售订单","销售单号")b.Groups.AddDef("货物名称")b.Groups.AddDef("生产厂家")
b.Groups.AddDef("提货机型")b.Totals.AddDef("数量")b.Totals.Addexp("金额","单价 * 数量")b.VerticalTotal = Trueb.BuildMainTable = Tables("汇总统计")
帮助有介绍表达式列的处理:
http://www.foxtable.com/help/topics/1626.htm