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