以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 统计表 加载入 窗体的table 里面 不显示 汇总列? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=91446) |
-- 作者:ljh29206 -- 发布时间:2016/10/11 9:43:00 -- 统计表 加载入 窗体的table 里面 不显示 汇总列? Dim g As New CrossTableBuilder("统计表2", DataTables("ot_list")) g.HGroups.AddDef("人员角色") g.HGroups.AddDef("平日休日") g.VGroups.AddDef("加班内容") g.Totals.AddDef("加班时间", "加班时间") g.HorizontalTotal = True \'g.VerticalTotal = True g.Build() MainTable = Tables("统计表2") Dim t As Table = Tables("统计表2") Dim g1 As Subtotalgroup t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False t.SpillNode = True g1 = New Subtotalgroup g1.Aggregate = AggregateEnum.Sum g1.GroupOn = "人员角色" g1.TotalOn = "人均,总计" g1.Caption = "{0} 小计" t.SubtotalGroups.Add(g1) g1 = New Subtotalgroup g1.Aggregate = AggregateEnum.Sum g1.GroupOn = "*" g1.TotalOn = "人均,总计" g1.Caption = "总计" t.SubtotalGroups.Add(g1) t.Subtotal() 如题 动态插入 Tables("form1_table1").DataSource = DataTables("统计表2") If Forms("ot_view").Opened Then \'这个也不行 Tables("ot_view_Table1").DataSource = g.BuildDataSource() End If 不显示 汇总列
[此贴子已经被作者于2016/10/11 9:59:36编辑过]
|
-- 作者:有点蓝 -- 发布时间:2016/10/11 10:16:00 -- Dim g As New CrossTableBuilder("统计表2", DataTables("ot_list")) g.HGroups.AddDef("人员角色") g.HGroups.AddDef("平日休日") g.VGroups.AddDef("加班内容") g.Totals.AddDef("加班时间", "加班时间") g.HorizontalTotal = True \'g.VerticalTotal = True g.Build() MainTable = Tables("统计表2") Tables("form1_table1").DataSource = DataTables("统计表2") Dim t As Table = Tables("form1_table1") Dim g1 As Subtotalgroup t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False t.SpillNode = True g1 = New Subtotalgroup g1.Aggregate = AggregateEnum.Sum g1.GroupOn = "人员角色" g1.TotalOn = "人均,总计" g1.Caption = "{0} 小计" t.SubtotalGroups.Add(g1) g1 = New Subtotalgroup g1.Aggregate = AggregateEnum.Sum g1.GroupOn = "*" g1.TotalOn = "人均,总计" g1.Caption = "总计" t.SubtotalGroups.Add(g1) t.Subtotal() |