增加男 女列,代码改为:
Dim dr As DataRow = e.DataRow
Dim dt As DataTable =DataTables("ryxxb")
If e.DataCol.Name = "dwdm" Then
dr("zzry") = dt.Compute("Count(xm)", "zzf = false And dwdm = '" & dr("dwdm") & "'" )
dr("jzry") = dt.Compute("Count(xm)", "zzf = true And dwdm = '" & dr("dwdm") & "'")
dr("男") = dt.Compute("Count(xm)", "xb = True And dwdm = '" & dr("dwdm") & "'")
dr("女") = dt.Compute("Count(xm)", "xb = False And dwdm = '" & dr("dwdm") & "'")
End If
建议你直接用中文的列名,否则你会头晕,别人更头晕。
[此贴子已经被作者于2011-6-14 16:51:24编辑过]