各位老师好,我想统计出来公司各个部门员工不同学历的人数,按照帮助文件写了一段代码,可是代码不能用,请老师指点一下哪里错了,帮我修正一下,谢谢了
Dim b As New SQLGroupTableBuilder("各部门人员文化程度统计表1","公司人员信息表")
b.ConnectionName = "database"
b.Groups.AddDef("部门类别")
b.Totals.AddDef("文化程度", Aggregate.Count "初中")
b.Totals.AddDef("文化程度", Aggregate.Count "高中")
b.Totals.AddDef("文化程度", Aggregate.Count "大学")
b.Subtotal = True
b.FromServer = True
b.build()
DataTables("各部门人员文化程度统计表1").SysStyles("Alternate").BackColor = Color.Bisque
MainTable = Tables("各部门人员文化程度统计表1")