以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=125831)

--  作者:LXP166
--  发布时间:2018/10/8 10:46:00
--  [求助]
Dim g As New GroupTableBuilder("统计表1", DataTables("考勤记录"))
g.Filter = ""

g.Groups.AddDef("身份证号")
g.Totals.AddDef("缺勤天数", AggregateEnum.Count)
g.Filter = "[缺勤天数] > 3"
g.Build()
MainTable = Tables("统计表1")

Dim dtb As New DataTableBuilder("统计")
dtb.AddDef("员工姓名", Gettype(String), 32)
dtb.AddDef("身份证号", Gettype(String), 32)
dtb.AddDef("缺勤天数", Gettype(Double))
dtb.Build()
MainTable= Tables("统计")
Dim  sfz  As String
Dim  a2  As String
Dim drn As DataRow
Dim dcs As DataRow
For r As Integer = 0 To g.Rows.Count - 1 \'填入数据
    sfz    =g.Rows(r)("身份证号")
    a2 = "  [身份证号] =  \'" & sfz  &  "\'"
    drn =  g.find(  a2 )
    If drn  IsNot  Nothing Then \'如果没有找到的
        dcs = DataTables("统计").AddNew()
        dcs("员工姓名") = drn("员工姓名")
        dcs("身份证号") = drn("身份证号")
        dcs("缺勤天数") = g.Rows(r)("缺勤天数")
    End If

Next


执行起来提示  rows 不是 GroupTableBuilder 成员
   错误代码 :For r As Integer = 0 To g.Rows.Count - 1


--  作者:有点甜
--  发布时间:2018/10/8 10:51:00
--  

Dim t As table = Tables("统计表1")

For r As Integer = 0 To t.Rows.Count - 1 \'填入数据