Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
正确的结果应是图1:
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:管理项目4.table |
终于找到1种可以实现的方法(用计算代码)
但想不通,(以下的代码也不行,晕中....)
'''
With tables("表A")
for i as integer = 0 to .count
.Position = i
dim dackj as string
with tables("表A.表C")
For r As integer = 0 To .Rows.Count - 1
if .rows(r)("结果") = "检出" then
dackj = dackj & "," & "序号" & .rows(r)("序号")
tables("表A").current("结论") = dackj & "不合格"
end if
next
end with
next
End With
'''
dim dr1,dr2 as datarow
dim bj,dackj as string
dim dt1,dt2 as datatable
dt1 = datatables("表A")
dt2 = datatables("表C")
for Each dr1 in dt1.select("[编号] >''")
bj = "[编号] = '" & dr1("编号")
bj = bj & "'And [结果] = '检出'"
if dt2.Find(bj) Is Nothing then
dr1("结论") = "全部合格"
Else
for each dr2 in Dt2.select(bj)
dackj = dackj & "," & "编号" & dr2("序号")
next
dr1("结论") = dackj.substring(1) & "不合格"
End If
next
'''
dim dr1,dr2 as datarow
dim bj,dackj as string
dim dt1,dt2 as datatable
dt1 = datatables("表A")
dt2 = datatables("表C")
for Each dr1 in dt1.select("[编号] >''")
bj = "[编号] = '" & dr1("编号")
bj = bj & "'And [结果] = '检出'"
dackj = ""
for each dr2 in Dt2.select(bj)
dackj = dackj & "," & "编号" & dr2("序号")
next
dr1("结论") = dackj.substring(1) & "不合格"
Next
'''
dim dr1,dr2 as datarow
dim bj,dackj as string
dim dt1,dt2 as datatable
dt1 = datatables("表A")
dt2 = datatables("表C")
for Each dr1 in dt1.select("[编号] >''")
bj = "[编号] = '" & dr1("编号")
bj = bj & "'And [结果] = '检出'"
dackj = ""
for each dr2 in Dt2.select(bj)
dackj = dackj & "," & "编号" & dr2("序号")
next
if dackj <> "" then
dr1("结论") = dackj.substring(1) & "不合格"
else
dr1("结论") = "全部合格"
end if
Next