以下是引用狐狸爸爸在2014-5-7 16:09:00的发言:
Dim b As New SQLCrossTableBuilder("统计表1","生产订单明细")
b.C
b.AddTable("生产订单明细","生产订单编号","生产订单","生产订单编号")
b.HGroups.AddDef("{生产订单明细}.颜色")
b.VGroups.AddDef("{生产订单明细}.尺码")
b.Totals.AddDef("数量","{生产订单明细}.数量")
b.Filter = "款号 = 'a'"
b.VerticalTotal = True
b.HorizontalTotal = True
b.Build
MainTable = Tables("统计表1")
b.Totals.AddDef("{生产订单明细}.数量") 有誤有點說不過去:
而b.Totals.AddDef("数量","{生产订单明细}.数量")似乎應該是
b.Totals.AddExp("数量","{生产订单明细}.数量")的用法吧?