Foxtable(狐表)用户栏目专家坐堂 → 多行统计问题求助?


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

主题:多行统计问题求助?

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/3 14:33:00 [显示全部帖子]

Dim t As Table = Tables("窗口1_table1")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = True
t.TreeVisible = True
t.SpillNode = True

g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "第三列"
g.TotalOn = "第五列,第七列"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)

t.Subtotal()

For i As Integer = 0 To t.Rows.count(True)-1
    Dim r As Row = t.Rows(i, True)
    If r.IsGroup Then
        Dim nr = t.Rows(i+1, True)
        r("第二列") = nr("第二列")
        r("第三列") = nr("第三列")
        r("第四列") = nr("第四列")
        r("第六列") = nr("第六列")
        r("第八列") = nr("第八列")
        r("第九列") = nr("第九列")
        r("第十列") = nr("第十列")
        r("备注") = nr("备注")
    End If
Next


 回到顶部