以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]选中的行,用表达式怎么写。  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=120838)

--  作者:2900819580
--  发布时间:2018/6/24 20:36:00
--  [求助]选中的行,用表达式怎么写。

    Dim i As Integer
    Dim ph As String
    For Each r As Row In tb1.GetCheckedRows
        If r.IsNull("生产任务单号") = False Then
            i += 1
            ph = r("生产任务单号")
        End If
    Next

 

上面是我用循环计算出来的,现在想用表达式做,怎么做。

 

Dim tb As Table = Tables(e.Form.Name & "_" & )
Dim dt As DataTable = tb.DataTable
Dim r As Row = tb.Current

Dim s As Integer = dt.Compute("count(生产任务单号)",选中的行)    选中的行,用表达式怎么写。


--  作者:有点甜
--  发布时间:2018/6/24 23:43:00
--  
无法直接得到这个条件的。必须循环求和(或者循环合成条件,如 _Identify in (1,2,3,7,10) )