Dim g As New CrossTableBuilder("升班率", DataTables("课程记录"))
g.Caption = "升班率"
g.HGroups.AddDef("分类")
g.HGroups.AddDef("星期")
g.HGroups.AddDef("序号")
g.VGroups.AddDef("已交","升|已升")
g.Totals.AddDef("姓名", AggregateEnum.Count, "升班")
Tables("通用报表管理_Table1").DataSource = g.BuildDataSource
Tables("通用报表管理_Table1").DataTable.DataCols.Add("升班率",Gettype(Double),"姓名_2/(姓名_1+姓名_2)")
Tables("通用报表管理_Table1").DataTable.DataCols("升班率").SetFormat("#0.00%")