目的:按苏木乡镇分组 组合多个统计结果 并垂直方向自动汇总
代码运行后统计结果正确 但是“合计”不在最低行显示 合计行和以上行还是灰色的 什么原因啊
代码:
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