以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  【狐建议】主题格式应该这样!  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=4163)

--  作者:HLJ
--  发布时间:2009/9/1 13:18:00
--  【狐建议】主题格式应该这样!

主题规范醒目 → 则容易吸引眼球 → 则人气旺盛 → 则有利狐表发展!

如:

【狐求助】请教跨表统计的代码

......


--  作者:yangming
--  发布时间:2009/9/1 13:41:00
--  
以下是引用HLJ在2009-9-1 13:18:00的发言:

主题规范醒目 → 则容易吸引眼球 → 则人气旺盛 → 则有利狐表发展!

如:

【狐求助】请教跨表统计的代码

......

呵呵


--  作者:blackzhu
--  发布时间:2009/9/1 15:04:00
--  

Dim T2 As DataRow = e.DataRow
Dim Str As String
Str = "[IO] = \'" & T2("IO") & "\' And [口岸] = \'" & T2("口岸") & "\'And [色号] = \'" & T2("色号") & "\'And [色名] = \'" & T2("色名") & "\'And [运输方式] = \'" & T2("运输方式") & "\'and[包装]=\'" & T2("包装") & "\'"
Select Case e.DataCol.Name
    Case "IO","口岸","色号","色名","运输方式","包装"
        T2("XS") = DataTables("装箱单").Compute("Sum(XS)",Str)*DataTables("装箱单").Compute("Sum(箱数)",Str)

        T2("S") = DataTables("装箱单").Compute("Sum(S)",Str)
        T2("M") = DataTables("装箱单").Compute("Sum(M)",Str)
        T2("L") = DataTables("装箱单").Compute("Sum(L)",Str)
        T2("XL") = DataTables("装箱单").Compute("Sum(XL)",Str)
        T2("XXL") = DataTables("装箱单").Compute("Sum(XXL)",Str)
        T2("XXXL") = DataTables("装箱单").Compute("Sum(XXXL)",Str)
End Select



跨表统计代码,列名等自己修改.
--  作者:HLJ
--  发布时间:2009/9/1 15:21:00
--  
以下是引用blackzhu在2009-9-1 15:04:00的发言:

Dim T2 As DataRow = e.DataRow
Dim Str As String
Str = "[IO] = \'" & T2("IO") & "\' And [口岸] = \'" & T2("口岸") & "\'And [色号] = \'" & T2("色号") & "\'And [色名] = \'" & T2("色名") & "\'And [运输方式] = \'" & T2("运输方式") & "\'and[包装]=\'" & T2("包装") & "\'"
Select Case e.DataCol.Name
    Case "IO","口岸","色号","色名","运输方式","包装"
        T2("XS") = DataTables("装箱单").Compute("Sum(XS)",Str)*DataTables("装箱单").Compute("Sum(箱数)",Str)

        T2("S") = DataTables("装箱单").Compute("Sum(S)",Str)
        T2("M") = DataTables("装箱单").Compute("Sum(M)",Str)
        T2("L") = DataTables("装箱单").Compute("Sum(L)",Str)
        T2("XL") = DataTables("装箱单").Compute("Sum(XL)",Str)
        T2("XXL") = DataTables("装箱单").Compute("Sum(XXL)",Str)
        T2("XXXL") = DataTables("装箱单").Compute("Sum(XXXL)",Str)
End Select



跨表统计代码,列名等自己修改.

呵呵,适合这个:【狐狸糊涂】 糊涂糊涂


--  作者:yangming
--  发布时间:2009/9/1 15:22:00
--  
【狐狸糊涂】=糊里糊涂