Foxtable(狐表)用户栏目专家坐堂 → 筛选行


  共有1884人关注过本帖树形打印复制链接

主题:筛选行

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/2 11:20:00 [显示全部帖子]

For Each dr As DataRow In DataTables("欠款明细").Select("", cs)

 

改成

 

For Each dr As DataRow In DataTables("欠款明细").Select("", cs & ", _Identify desc")

 

如果还有问题,上传一个实例测试。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/2 23:21:00 [显示全部帖子]

Dim idx As String = "-1,"
Dim idx_temp As String = ""
Dim pdr As DataRow = Nothing
Dim count As Integer = 0
Dim cs As String = "第一列"
'For Each dr As DataRow In DataTables("欠款明细").Select("", cs)
For Each dr As DataRow In DataTables("表A").Select("", cs & ", _Identify")
    Dim flag As Boolean = False
    If pdr IsNot Nothing Then
        For Each c As String In cs.split(",")
            If pdr(c)<> dr(c) Then
                flag = True
                Exit For
            End If
        Next
        If flag Then
            'msgbox(pdr("第一列") & " " & pdr("第二列") & " " & dr("第二列") & " " & dr("第一列"))
            If pdr("第二列") <> 0 Then
                idx &= pdr("_Identify") & ","
            End If
        End If
    End If
    pdr = dr
Next
If pdr IsNot Nothing Then
    If pdr("第二列") <> 0 Then
        idx &= pdr("_Identify") & ","
    End If
End If
e.Form.controls("Table1").Table.Filter = "_Identify In (" & idx.trim(",") & ")"

 回到顶部