Dim b As New SQLGroupTableBuilder("统计表1","辅助总账")b.AddTable("辅助总账","部门编码","责任中心档案","部门编号") b.Groups.AddDef("部门名称") b.Groups.AddDef("大区") b.Totals.AddDef("销售金额") Tables("店铺业绩排名_Table1").DataSource = b.BuildDataSource()
Tables("店铺业绩排名_Table1").sort = 2
如果要分组排名,建议看看 http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=113873&skin=0