Foxtable(狐表)用户栏目专家坐堂 → 这样的表如何汇总


  共有7849人关注过本帖树形打印复制链接

主题:这样的表如何汇总

帅哥哟,离线,有人找我吗?
XYT
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1418 积分:7167 威望:0 精华:0 注册:2013/3/18 8:37:00
  发帖心情 Post By:2013/4/19 12:06:00 [显示全部帖子]

Dim t As Table = Tables("目标成本")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = False
t.SpillNode = 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 = "{0} 小计"
t.SubtotalGroups.Add(g)


g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "一级科目"
g.TotalOn = "目标成本"
g.Caption = "{0} 合计"
t.SubtotalGroups.Add(g)


t.Subtotal()

 

基本和你要的差不多,你再改下


 回到顶部