以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  垂直方向自动汇总问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=69918)

--  作者:Fking
--  发布时间:2015/6/12 17:07: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


 

     


--  作者:狐狸爸爸
--  发布时间:2015/6/12 17:45:00
--  

1、你的图片看不到

2、最好直接上传可以测试的例子,方便测试分析


--  作者:大红袍
--  发布时间:2015/6/12 17:58:00
--  

 执行完以后,你再加上一个汇总模式不就行了?

 

 http://www.foxtable.com/help/topics/00144.htm

 


--  作者:Fking
--  发布时间:2015/6/12 18:05:00
--  

图片点击可在新窗口打开查看