If e.DataCol.Name = "期初_借方" Then
Dim dr1 As DataRow
Dim km1,flt ,flt1 As String
km1 =e.DataRow("科目代码")
If km1 > "" Then
flt ="科目代码 = '" & km1.Substring(0,km1.length-2) & "'"
flt1 ="科目代码 like '" & km1.Substring(0,km1.length-2) & "%' and Len(科目代码) =" & km1.length
dr1=e.DataTable.Find(flt)
If dr1 IsNot Nothing Then
dr1("期初_借方") = e.DataTable.Compute("sum([期初_借方])",flt1)
End If
End If
End If
[此贴子已经被作者于2012-7-18 12:15:04编辑过]