Dim dt As DataTable = DataTables("年度社保库")
DataTables("社保年度汇总").DataRows.Clear()
Dim Arys As List(of String())
Arys = dt.GetValues("姓名|年度")
For Each Ary As String() In Arys
Dim dr As DataRow = DataTables("社保年度汇总").AddNew()
dr("姓名") = Ary(0)
dr("年度") = Ary(1)
For Each dc As DataCol In dt.DataCols
If dc.IsNumeric AndAlso dc.Name <> "年度" Then
If DataTables("社保年度汇总").DataCols.Contains(dc.Name) Then
dr(dc.Name) = dt.Compute("Sum(dc.Name)","姓名 = '" & Ary(0) & "' And 年度 = " & Ary(1))
End If
End If
Next
Next
错误提示:
此主题相关图片如下:550506.png