e.DataRow("费用")=Nothing
If e.DataRow.Isnull("费用") Then
Dim Filter As String Dim ct,sm As Integer Filter = "日期 = #" & e.DataRow("日期") & "# And 编码 = '" & e.DataRow("编码") & "'" sm = DataTables("广告费").Compute("sum([消费])",Filter) ct = DataTables("分摊").Compute("Count([编码])", Filter ) e.DataRow("费用")=sm/ct
End If