按2楼的改了还是不行呀,郁闷!
Dim tb As DataTable = DataTables("已审综合资产负债表")
Dim tb1 As DataTable = DataTables("余额横表已审")
Dim nms As List (of String) = DataTables("会计科目").GetValues("资产负债表","资产负债表 is not null")
If e.DataCol.name = "资产" Then
For Each nm As String In nms
If DataTables("会计科目").find("资产负债表 = '" & nm & "'")("资产负债表包含科目") Is Nothing Then
'tb.find("资产= '" & nm & "'")("资产2015年期初数") = tb1.Compute("sum(" & nm & ")","会计年度 = '2014'")
tb.find("资产= '" & nm & "'")("资产2015年期初数") = tb1.Compute("sum(" & nm & ")","会计年度 = '2014'")
'tb.find("资产= '交易性金融资产'")("资产2015年期初数") = tb1.Compute("sum(交易性金融资产)","会计年度 = '2014'")
'tb.find("资产= '货币资金'")("资产2015年期初数") = tb1.Compute("sum(库存现金)","会计年度 = '2014'")+tb1.Compute("sum(银行存款)","会计年度 = '2014'")+tb1.Compute("sum(其他货币资金)","会计年度 = '2014'")
End If
Next
End If