DataTables("鉴定上报表").DataRows.Clear
For Each ary() As String In dt.GetValues("鉴定工种|代码")
Dim dr As DataRow = DataTables("鉴定上报表").AddNew
dr("鉴定工种") = ary(0)
dr("代码") = ary(1)
dt = DataTables("报名登记表")
dr("鉴定考核人数_初级工_2") = dt.Compute("Count(身份证号码)", "鉴定等级 = '初级工' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("鉴定考核人数_中级工_3") = dt.Compute("Count(身份证号码)", "鉴定等级 = '中级工' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("鉴定考核人数_高级工_4") = dt.Compute("Count(身份证号码)", "鉴定等级 = '高级工' And 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("鉴定考核人数_技师_5") = dt.Compute("Count(身份证号码)", "鉴定等级 = '技师' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("鉴定考核人数_高级技师_6") = dt.Compute("Count(身份证号码)", "鉴定等级 = '高级技师' And 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dt = DataTables("证书编号表")
dr("取得证书人数_初级工_8") = dt.Compute("Count(身份证号码)", "鉴定等级 = '初级工' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("取得证书人数_中级工_9") = dt.Compute("Count(身份证号码)", "鉴定等级 = '中级工' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("取得证书人数_高级工_10") = dt.Compute("Count(身份证号码)", "鉴定等级 = '高级工' And 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("取得证书人数_技师_11") = dt.Compute("Count(身份证号码)", "鉴定等级 = '技师' and 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
dr("取得证书人数_高级技师_12") = dt.Compute("Count(身份证号码)", "鉴定等级 = '高级技师' And 鉴定工种 = '" & dr("鉴定工种") & "' and " & filter )
Next