Foxtable(狐表)用户栏目专家坐堂 → 垂直方向自动汇总问题


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

主题:垂直方向自动汇总问题

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


加好友 发短信
等级:婴狐 帖子:6 积分:146 威望:0 精华:0 注册:2015/6/2 16:27:00
垂直方向自动汇总问题  发帖心情 Post By:2015/6/12 23:17:00 [只看该作者]

 

目的:按苏木乡镇分组  组合多个统计结果 并垂直方向自动汇总

代码运行后统计结果正确   但是“合计”不在最低行显示  合计行和以上行还是灰色的   什么原因啊

代码:

        Dim w1_g1 As New GroupTableBuilder("统计表1", DataTables("治安满意率调查问卷"))
        Dim w1_dt1 As fxDataSource
        w1_g1.Groups.AddDef("smxz")
        w1_g1.Totals.AddDef("wt1", AggregateEnum.Count,"","安全")
        w1_g1.VerticalTotal = True
        w1_g1.Filter = "[wt1] Like '%1%'"
        w1_dt1 = w1_g1.BuildDataSource()

 

        Dim w1_g2 As New GroupTableBuilder("统计表2", DataTables("治安满意率调查问卷"))
        Dim w1_dt2 As fxDataSource
        w1_g2.Groups.AddDef("smxz")
        w1_g2.Totals.AddDef("wt1", AggregateEnum.Count,"","比较安全")
        w1_g2.VerticalTotal = True
        w1_g2.Filter = "[wt1] Like '%2%'"
        w1_dt2 = w1_g2.BuildDataSource()

 

        Dim w1_g3 As New GroupTableBuilder("统计表3", DataTables("治安满意率调查问卷"))
        Dim w1_dt3 As fxDataSource
        w1_g3.Groups.AddDef("smxz")
        w1_g3.Totals.AddDef("wt1", AggregateEnum.Count,"","基本安全")
        w1_g3.VerticalTotal = True
        w1_g3.Filter = "[wt1] Like '%3%'"
        w1_dt3 = w1_g3.BuildDataSource()

 

        Dim w1_g4 As New GroupTableBuilder("统计表4", DataTables("治安满意率调查问卷"))
        Dim w1_dt4 As fxDataSource
        w1_g4.Groups.AddDef("smxz")
        w1_g4.Totals.AddDef("wt1", AggregateEnum.Count,"","不太安全")
        w1_g4.VerticalTotal = True
        w1_g4.Filter = "[wt1] Like '%4%'"
        w1_dt4 = w1_g4.BuildDataSource()

 

        w1_dt1.Combine("smxz",w1_dt2,"smxz")
        w1_dt1.Combine("smxz",w1_dt3,"smxz")
        w1_dt1.Combine("smxz",w1_dt4,"smxz")

 

        Forms("tongji").Open()
        Tables("tongji_TabTj").DataSource = w1_dt1


 回到顶部