Foxtable(狐表)用户栏目专家坐堂 → [原创]请问这段程序有什么错?


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

主题:[原创]请问这段程序有什么错?

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


加好友 发短信
等级:幼狐 帖子:190 积分:1597 威望:0 精华:0 注册:2011/5/19 10:05:00
[原创]请问这段程序有什么错?  发帖心情 Post By:2011/5/19 17:37:00 [显示全部帖子]

下面二个循环去掉任何一个都正常,二个都在就出错:a child row was mutilple parents.

 

Dim dt1 As DataTable = DataTables("凭证")
Dim dt2 As DataTable = DataTables("凭证明细")
Dim Customers As List(Of String)
Customers = dt1.GetUniqueValues("", "凭证类别")

With Tables("凭证")
For Each Customer As String In Customers
     Dim r As  Row = .Addnew()
     r("凭证类别") = Customer
     r("凭证ID") = "合计"
Next
End With

 

With Tables("凭证明细")
For Each Customer As String In Customers
     Dim r2 As  Row = .Addnew()
     r2("凭证类别") = Customer
     r2("凭证ID") = "合计"
Next
End With


 回到顶部