代码很简单:
Dim b As New SQLGroupTableBuilder("统计表1","表A")b.AddTable("表A","品类","表D","品类") b.Groups.AddDef("{表A}.品类")b.Totals.AddExp("数量","{表A}.数量 - {表D}.数量")b.Build()MainTable = Tables("统计表1")
参考这个:
http://www.foxtable.com/help/topics/1626.htm