以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  肿么办?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=63597)

--  作者:石四
--  发布时间:2015/1/24 12:59:00
--  肿么办?

重复了:

For Each nm() As String In dt1.GetValues("客户名称|年|月")
For Each nv() As String In dt2.GetValues("客户名称|年|月")
    Dim dr As Row = Tables("财务_Table1").AddNew()
    dr("客户名称") = nm(0)
    dr("年") = nm(1)
    dr("月") = nm(2)
    dr("实收金额") = dt1.Compute("Sum(实收金额)","客户名称 = \'" & nm(0) & "\'And [年] = \'" & nm(1) & "\'And [月] = \'" & nm(2) & "\'")
    dr("开票金额") = dt2.Compute("Sum(开票金额)","客户名称 = \'" & nv(0) & "\'And [年] = \'" & nv(1) & "\'And [月] = \'" & nv(2) & "\'")
    dr("开票税额") = dt2.Compute("Sum(开票税额)","客户名称 = \'" & nv(0) & "\'And [年] = \'" & nv(1) & "\'And [月] = \'" & nv(2) & "\'")
    dr("开票总额") = dt2.Compute("Sum(开票总额)","客户名称 = \'" & nv(0) & "\'And [年] = \'" & nv(1) & "\'And [月] = \'" & nv(2) & "\'")
Next
Next


--  作者:Bin
--  发布时间:2015/1/24 14:13:00
--  
你要做什么? 请上例子说清楚需求.