Select Case e.DataCol.Name
Case "月份","项目ID","工料一类"
Dim Filter As String = "[月份] = '" & e.DataRow("统计月") & "' and [项目ID] = '" & e.DataRow("项目ID") & "'"
e.DataRow("劳务消耗额") = DataTables("库明细").Compute("Sum(累计出库金额)", filter & " and [工料一类] = '劳务'")
e.DataRow("材料消耗额") = DataTables("库明细").Compute("Sum(累计出库金额)", filter & " and [工料一类] = '材料'")
e.DataRow("机械消耗额") = DataTables("库明细").Compute("Sum(累计出库金额)", filter & " and [工料一类] = '机械'")
End Select