Dim Filter As String
Dim br As DataRow
Dim Val As Double
Dim Arys As List(Of String())
Arys = DataTables("行政后勤管理").GetUniqueValues("年 Is Not Null","年","月","报表名称","统计类型","项目","数据统计项目")
For Each Ary As String() In Arys
Filter = "年 = '" & Ary(0) & "'And 月 ='" & Ary(1) & "' And 报表名称='" & Ary(2) & "'And 统计类型 = '" & Ary(3) & "'And 项目 ='" & Ary(4) & "'And 数据统计项目='" & Ary(5) & "'"
If Filter > "" Then
br = DataTables("汇总表").Find(Filter)
If br IsNot Nothing Then
Dim s() As String = {"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"}
For i As Integer = 0 To s.Length - 1
Val= DataTables("行政后勤管理").Compute("Sum(s(i))",Filter)
If Val > 0 Then
br(S(i)) = Val
Else
br(S(i)) = Nothing
End If
Next
End If
End If
Next
DataTables("汇总表").ResumeRedraw