
此主题相关图片如下:余额.png

Dim t As Table = Tables("会计科目.凭证明细")
Dim g As SubtotalGroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = True
t.SpillNode = True
g = New SubtotalGroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "日期"
g.TotalOn = "借方金额,贷方金额"
g.Caption = "{0}月 小计"
g.DateGroup = DateGroupEnum.Month
t.SubtotalGroups.Add(g)
g = New SubtotalGroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "日期"
g.TotalOn = "借方金额,贷方金额"
g.Caption = "{0}月 累计"
g.DateGroup = DateGroupEnum.Month
g.upto = True
t.SubtotalGroups.Add(g)
t.Subtotal()
我现在的代码,我想在小计栏和累计栏生成 余额=借方小计-贷方小计 和 余额=借方累计-贷方小计累计 代码怎么些
谢谢大侠指导