Foxtable(狐表)用户栏目专家坐堂 → 筛选统计问题


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

主题:筛选统计问题

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


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/7/25 20:25:00 [显示全部帖子]

Dim r As Row
Dim slit() As String = {"A","B","C","D"}
Dim idx As Integer = 0
For Each s As String In DataTables("军工布置表").GetValues("军工布置")
    r  = Tables("军工位置布置统计表").AddNew
    r("军工布置") = s
    
    Dim lst As List(of String) = DataTables("军工布置表").GetValues("位置代码","军工布置='" & s & "'")
    Dim s1 As String = lst(0)
    Dim s2 As String = lst(0)
    For ias Integer = 1 To lst.Count - 1
        If cint(s1)+1 <> cint(lst(i)) Then
            s2 = s2 & "--" & s1
            r(slit(idx) & "号码") = s2
            s2 = lst(i)
            idx += 1
        End If
        s1 = lst(i)
    Next
Next

 回到顶部