这个问题已经困扰我好久了,例如在做销售出库单时,在统计行,遇到重量列时用求和,但遇到卷号列时希望用计数,原来用EXCEL时很容易实现,但就下面的代码如何能实现这个效果?谢谢!
Dim t As Table = Tables("销售出库单打印弹窗_Table1")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = False
t.SpillNode = True
t.TreeVisible=True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "往来合同"
g.TotalOn = "重量,套筒重量"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "*"
g.TotalOn = "重量,套筒重量"
g.Caption = "总计"
t.SubtotalGroups.Add(g)
t.Subtotal()
此主题相关图片如下:无标题.jpg