-- 作者:狂风暴雨狂波
-- 发布时间:2018/3/8 17:23:00
--
Dim t As Table = e.Table If t.Rows.Count>0 Then Dim g As Subtotalgroup t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False t.SpillNode = True \'\'t.filter = "日期 Is Not Null"
g = New Subtotalgroup g.Aggregate = AggregateEnum.Sum g.GroupOn = "日期" g.TotalOn = "借方数量,借方金额,贷方数量,贷方金额" g.Caption = "本月小计" g.DateGroup = DateGroupEnum.Month t.SubtotalGroups.Add(g) g = New Subtotalgroup g.Aggregate = AggregateEnum.Sum g.GroupOn = "日期" g.TotalOn = "借方数量,借方金额,贷方数量,贷方金额" g.Caption = "本季合计" g.DateGroup = DateGroupEnum.Quarter t.SubtotalGroups.Add(g) g = New Subtotalgroup g.Aggregate = AggregateEnum.Sum g.GroupOn = "日期" g.TotalOn = "借方数量,借方金额,贷方数量,贷方金额" g.Caption = "本年累计" g.DateGroup = DateGroupEnum.Year g.upto = True t.SubtotalGroups.Add(g) t.Subtotal() End If
代码放在AfterFilter表事件中.
|