If e.DataCol.Name = "科目代码" OrElse e.DataCol.Name = "年度" OrElse e.DataCol.Name = "月份" Then
Dim Str1 As String = e.DataRow("科目代码")
If Str1 > "" AndAlso Str1.Contains(e.DataRow("科目名称")) Then
Dim filter1 As String = "年度 = '" & e.DataRow("年度") & "' And 月份 <= '" & e.DataRow("月份") & "'"
e.DataRow("借方本期") = DataTables("凭证明细表").Compute("sum(借方金额)" ,filter1 & " And 科目代码 Like '%" & Str1 & "%'")
Else
e.DataRow("借方本期") = 0
End If
End If