Foxtable(狐表)用户栏目专家坐堂 → 最末行如何接收以前行的内容?


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

主题:最末行如何接收以前行的内容?

美女呀,离线,留言给我吧!
shxiaoya
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:191 积分:1442 威望:0 精华:2 注册:2008/9/7 21:30:00
最末行如何接收以前行的内容?  发帖心情 Post By:2009/5/22 12:43:00 [只看该作者]

显示结果见“比较命令”列
要求:无论修改、删除行,最后一行都及时发生变化。
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目2.table


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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2009/5/22 13:07:00 [只看该作者]

小妹妹,高级筛选窗口不是这么做的。
比较命令列不需要,保留前三列,最后单击一个按钮,根据用户的输入合成条件表达式,系统的高级筛选窗口就是这么做的。


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


加好友 发短信 一级勋章
等级:MVP荣誉狐 帖子:5154 积分:31434 威望:0 精华:8 注册:2008/9/8 12:27:00
  发帖心情 Post By:2009/5/22 13:09:00 [只看该作者]

是不是删除了第二行后,最后行的比较列就由 [用户编号] = '11' And [负责人] = 'bb' Or [班组] = '2班'  自动变为:[用户编号] = '11' Or [班组] = '2班'     

我理解的,是这样吗?


 回到顶部
美女呀,离线,留言给我吧!
shxiaoya
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:191 积分:1442 威望:0 精华:2 注册:2008/9/7 21:30:00
  发帖心情 Post By:2009/5/22 15:10:00 [只看该作者]

搞定图片点击可在新窗口打开查看

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


加好友 发短信 一级勋章
等级:MVP荣誉狐 帖子:5154 积分:31434 威望:0 精华:8 注册:2008/9/8 12:27:00
  发帖心情 Post By:2009/5/22 21:52:00 [只看该作者]

以下是引用shxiaoya在2009-5-22 15:10:00的发言:
搞定图片点击可在新窗口打开查看

能分享一下吗? 谢谢老师了~


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


加好友 发短信 一级勋章
等级:MVP荣誉狐 帖子:5154 积分:31434 威望:0 精华:8 注册:2008/9/8 12:27:00
  发帖心情 Post By:2009/5/25 13:32:00 [只看该作者]

没有分享到 shxiaoya 的成果,自己在1楼的附件的基础上做的代码,不知道是否完善::


if e.datacol.name = "内容" orelse e.datacol.name = "连接" orelse e.datacol.name = "列" orelse e.datacol.name = "比较" then
    If Currenttable.position = 0 Then
        If CurrentTable(0,"内容") = nothing Then
            CurrentTable(0,"比较命令") = nothing
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                    if CurrentTable(0,"比较命令") <> ""
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    else
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                        CurrentTable(r,"比较命令") = CurrentTable(r,"比较命令").replace(CurrentTable(1,"连接"),"")
                    end if

                    end if
                Next
        else
            Dim r0 As Row = Tables("表A").Rows(0)
            r0("比较命令")  = "[" & r0("列") & "] "  & r0("比较") & " '" & r0("内容") & "'"
            if Currenttable.position+1 <  Currenttable.count -1 then
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    end if
                Next
            end if
        end if
    end if
    If Currenttable.position > 0 Then
        Dim d As string
        d = CurrentTable.current("编号")
        if CurrentTable.current.isnull("内容") then
            CurrentTable.current("比较命令") = nothing
            if Currenttable.position +1 <= Currenttable.count -1 then
                For  r2 As integer = Currenttable.position +1 to Currenttable.count -1
                    if CurrentTable(r2,"内容") <> "" then
                        CurrentTable(r2,"比较命令") = CurrentTable(r2,"比较命令").replace(CurrentTable(Currenttable.position,"连接") & " " & "[" & CurrentTable(Currenttable.position,"列") & "] "  & CurrentTable(Currenttable.position,"比较") & " '" & d & "'" ," ")
                    end if
                Next
            end if
        else
            CurrentTable(Currenttable.position ,"比较命令") = CurrentTable(Currenttable.position -1,"比较命令") & CurrentTable(Currenttable.position ,"连接") & " " & "[" & CurrentTable(Currenttable.position ,"列") & "] "  & CurrentTable(Currenttable.position ,"比较") & " '" & CurrentTable(Currenttable.position ,"内容") & "'"
            if Currenttable.position+1 <=  Currenttable.count -1 then
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    end if
                Next
            end if
        end if
    end if
end if


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


加好友 发短信
等级:八尾狐 帖子:1812 积分:12999 威望:0 精华:14 注册:2008/10/11 18:07:00
  发帖心情 Post By:2009/5/25 13:39:00 [只看该作者]

以下是引用mr725在2009-5-25 13:32:00的发言:
没有分享到 shxiaoya 的成果,自己在1楼的附件的基础上做的代码,不知道是否完善::


if e.datacol.name = "内容" orelse e.datacol.name = "连接" orelse e.datacol.name = "列" orelse e.datacol.name = "比较" then
    If Currenttable.position = 0 Then
        If CurrentTable(0,"内容") = nothing Then
            CurrentTable(0,"比较命令") = nothing
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                    if CurrentTable(0,"比较命令") <> ""
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    else
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                        CurrentTable(r,"比较命令") = CurrentTable(r,"比较命令").replace(CurrentTable(1,"连接"),"")
                    end if

                    end if
                Next
        else
            Dim r0 As Row = Tables("表A").Rows(0)
            r0("比较命令")  = "[" & r0("列") & "] "  & r0("比较") & " '" & r0("内容") & "'"
            if Currenttable.position+1 <  Currenttable.count -1 then
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    end if
                Next
            end if
        end if
    end if
    If Currenttable.position > 0 Then
        Dim d As string
        d = CurrentTable.current("编号")
        if CurrentTable.current.isnull("内容") then
            CurrentTable.current("比较命令") = nothing
            if Currenttable.position +1 <= Currenttable.count -1 then
                For  r2 As integer = Currenttable.position +1 to Currenttable.count -1
                    if CurrentTable(r2,"内容") <> "" then
                        CurrentTable(r2,"比较命令") = CurrentTable(r2,"比较命令").replace(CurrentTable(Currenttable.position,"连接") & " " & "[" & CurrentTable(Currenttable.position,"列") & "] "  & CurrentTable(Currenttable.position,"比较") & " '" & d & "'" ," ")
                    end if
                Next
            end if
        else
            CurrentTable(Currenttable.position ,"比较命令") = CurrentTable(Currenttable.position -1,"比较命令") & CurrentTable(Currenttable.position ,"连接") & " " & "[" & CurrentTable(Currenttable.position ,"列") & "] "  & CurrentTable(Currenttable.position ,"比较") & " '" & CurrentTable(Currenttable.position ,"内容") & "'"
            if Currenttable.position+1 <=  Currenttable.count -1 then
                For  r As integer = 1 to Currenttable.count -1
                    if CurrentTable(r,"内容") <> "" then
                        CurrentTable(r,"比较命令") = CurrentTable(r-1,"比较命令") & CurrentTable(r,"连接") & " " & "[" & CurrentTable(r,"列") & "] "  & CurrentTable(r,"比较") & " '" & CurrentTable(r,"内容") & "'"
                    end if
                Next
            end if
        end if
    end if
end if

昏!天书一般.


 回到顶部