Dim tb As Table =Tables("资产负债表") Dim tb2 As Table = Tables("科目汇总表") Dim year1 As String = "年2011_期末余额" Select Case e.DataCol.name Case "资产" tb(1,1)=tb2.Compute("sum(year1)","会计科目_一级科目='库存现金'") tb(10,1)=tb2.Compute("sum(year1)","会计科目_一级科目='原材料'") End Select