Foxtable(狐表)用户栏目专家坐堂 → 提取不重复值及计数


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

主题:提取不重复值及计数

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


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

修改

 

ps(j)=t.Compute("count(月份辅助列)",iif(t.filter>"", t.filter, "1=1") & " And 临标=true and 月份辅助列='" & Products(j) & "'")


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


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

Dim t As Table =e.Form.controls("Table4").Table
Dim r As Row=e.Form.controls("Table4").Table.Current
Dim str As String
If Tables("入库单").DataTable.DataCols.Contains("月份辅助列")=False  Then
    Tables("入库单").DataTable.DataCols.Add("月份辅助列", Gettype(String),6)
End If
Dim ps As new List(of Integer)
Dim Products As List(Of String)= e.Form.controls("Table4").Table.DataTable.GetValues("月份辅助列",iif(t.filter>"", t.filter, "1=1") & " And 临标=true")
For j As Integer = 0 To Products.Count-1
    ps(j)=t.Compute("count(月份辅助列)",iif(t.filter>"", t.filter, "1=1") & " And 临标=true and 月份辅助列='" & Products(j) & "'")
    str &= "/" & Products(j) & "/" & ps(j) & "个记录" & vbcrlf
Next
MessageBox.Show(str, "提示")

 回到顶部