--
Dim Arys As List(Of String())
Arys = DataTables("表AA").GetValues("类别|品名|规格")
For Each Ary As String() In Arys
Dim dr As DataRow = DataTables("表BB").find("类别=\'" & Ary(0) & "\' and 品名=\'" & Ary(1) & "\' and 规格=\'" & Ary(2) & "\'")
If dr("类别") = \'大类\' AndAlso dr("品名") IsNot Nothing Then
dr("数量") = DataTables("表AA").Compute("sum(数量)", "类别=\'" & Ary(0) & "\' and 品名=\'" & Ary(1) & "\'")
End If
If dr IsNot Nothing Then
dr("数量") = DataTables("表AA").Compute("sum(数量)", "类别=\'" & Ary(0) & "\' and 品名=\'" & Ary(1) & "\' and 规格=\'" & Ary(2) & "\'")
End If
Next
执行大类没统计,加上红代码也不行,如何解决?