Dim d As Date = DataTables("销售订单").Compute("max(单据日期)") Dim g As New CrossTableBuilder("订单汇总", DataTables("销售订单"), "[单据日期] = #" & d & "#") g.HGroups.AddDef("原料名称") g.HGroups.AddDef("原料编码") g.HGroups.AddDef("采购员", "", "供应商编码") g.VGroups.AddDef("总公司") g.Totals.AddDef("订单数量/出成率", "订单数量") g.HorizontalTotal = True g.VerticalTotal = True g.Decimals = 1 g.Filter = "[单据日期] = #" & d & "#" g.Build() MainTable = Tables("订单汇总")
|