以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=88629) |
-- 作者:yang1972 -- 发布时间:2016/8/6 12:40:00 -- [求助] ![]() ![]() 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() 我现在的代码,我想在小计栏和累计栏生成 余额=借方小计-贷方小计 和 余额=借方累计-贷方小计累计 代码怎么些 谢谢大侠指导 |
-- 作者:Hyphen -- 发布时间:2016/8/6 14:33:00 -- 参考:http://www.foxtable.com/webhelp/scr/1964.htm |
-- 作者:yang1972 -- 发布时间:2016/8/6 19:54:00 -- 实在是看不懂,能帮我写个代码吗?谢谢 |
-- 作者:fjlclxj -- 发布时间:2016/8/6 20:11:00 -- Dim r As Row For i As Integer = 0 To t.Rows.Count(True) - 1 r = t.Rows(i,True) If r.IsGroup \'如果是分组行 r("余额") = r("借方金额")-r("贷方金额") End If Next
|