For Each Km As String In Kms
Dim jdrs As LIst(of DataRow) = DataTables("对应科目").Select("科目 = '" & Km & "'")
dr(Km & "A")=0
for each jdr as datarow in jdrs
dr(Km & "A") = dr(Km & "A") + dt.DataTable.Compute("Count("& jdr("题号") &")", "" & jdr("题号") & " = 'A' And [单位] = '" & dr("单位") & "' and [班] = '" & dr("班") & "'")
next
Next
这个意思?