'Dim f As New Filler
'f.SourceTable = DataTables("TAKATA成本") '指定数据来源
'f.SourceCols = "客户简称,月份,运输方式" '指定数据来源列
'f.DataTable = DataTables("开piao管理") '指定数据接收表
'f.DataCols = "客户简称,月份,运输方式" '指定数据接收列
'f.ExcludeExistValue = True
'f.Distinct = True
'f.append = False
'f.Fill() '填充数据
'Dim g As New Filler
'g.SourceTable = DataTables("成本明细") '指定数据来源
'g.SourceCols = "客户简称,月份" '指定数据来源列
'g.DataTable = DataTables("开piao管理") '指定数据接收表
'g.DataCols = "客户简称,月份" '指定数据接收列
'g.ExcludeExistValue = True
'g.Distinct = True
'g.append = False
'g.Fill() '填充数据
Select Case e.DataCol.name
Case "客户简称","月份"
e.DataRow("手册成本") = DataTables("手册业务").Compute("sum(成本合计)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "'" )
End Select
Select Case e.DataCol.name
Case "客户简称","月份"
e.DataRow("手册开piao") = DataTables("手册业务").Compute("sum(合计)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "'" )
End Select
Select Case e.DataCol.name
Case "客户简称","月份","运输方式"
If e.DataRow.IsNull("运输方式") Then
e.DataRow("进口成本") = DataTables("成本明细").Compute("sum(成本合计)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "'" )
Else
e.DataRow("进口成本") = DataTables("TAKATA成本").Compute("sum(应付)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "' and [运输方式]= '" & e.DataRow("运输方式") & "'" )
End If
End Select
Select Case e.DataCol.name
Case "客户简称","月份","运输方式"
If e.DataRow.IsNull("运输方式") Then
e.DataRow("进口垫付") = DataTables("账单明细").Compute("sum(垫付)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "'" )
Else
e.DataRow("进口垫付") = DataTables("TAKATA账单").Compute("sum(垫付费用)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "' and [运输方式]= '" & e.DataRow("运输方式") & "'" )
End If
End Select
Select Case e.DataCol.name
Case "客户简称","月份","运输方式"
If e.DataRow.IsNull("运输方式") Then
e.DataRow("进口开piao") = DataTables("账单明细").Compute("sum(合计)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "'" )
Else
e.DataRow("进口开piao") = DataTables("TAKATA账单").Compute("sum(合计)","[客户简称]= '" & e.DataRow("客户简称") & "' and [月份]= '" & e.DataRow("月份") & "' and [运输方式]= '" & e.DataRow("运输方式") & "'" )
End If
End Select