dr1 = DataTables("考试设置").Find("[学科]= '"&dr("学科") & "' And [学科]= '" & dr("年级") & "' And [期数]= '" & dr("期数") & "'")Select Case e.DataCol.Name
Case "年级","班级","期数","学科"
If dr.IsNull("学科") = False Then
dr("最高分") = dt.Compute("Max(" & dr("学科") & "_成绩)","[班级排名] ='"& dr("班级排名")&"'")
dr("最低分") = dt.Compute("Min(" & dr("学科") & "_成绩)","[班级排名] ='"& dr("班级排名")&"'")
dr("平均分_成绩") = dt.Compute("Avg(" & dr("学科") & "_成绩)","[班级排名] ='"& dr("班级排名")&"'")
if dr1 isnot nothing then
dr("及格_人数") =dt.Compute("Count(姓名)", "[班级排名]='"& dr("班级排名")&"'"&" And "& dr("学科") & "_成绩"&">=" &dr1("及格分"))
end if
dr("良好_人数") =dt.Compute("Count(姓名)", "[班级排名]='"& dr("班级排名")&"'"&" And "& dr("学科") & "_成绩"&">=" &"70")
dr("优秀_人数") =dt.Compute("Count(姓名)", "[班级排名]='"& dr("班级排名")&"'"&" And "& dr("学科") & "_成绩"&">=" &"85")
End If
End Select