以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  【求助】已添加了具有相同键的项  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=153289)

--  作者:wuopapa
--  发布时间:2020/8/6 10:48:00
--  【求助】已添加了具有相同键的项
报错提示:.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.5.29.8
错误所在事件:窗口,统计,Button3,Click
详细错误信息:
已添加了具有相同键的项。

代码如下,
Dim bd1 As New GroupTableBuilder("统计表1", DataTables("ER_SCJH"))
Dim dt1 As fxDataSource
bd1.Groups.AddDef("BM")
bd1.Groups.AddDef("DATE", "月")     
bd1.Totals.AddDef("完成情况_欠交金额", AggregateEnum.Count, "合同欠交_项数")
bd1.Totals.AddDef("完成情况_欠交金额", "合同欠交_当月")
bd1.Totals.AddDef("完成情况_欠交金额", "合同欠交_累计",True)
bd1.VerticalTotal = True
bd1.Filter = "[是否完成] = \'否\'"
dt1 = bd1.BuildDataSource() 
Dim bd2 As New GroupTableBuilder("统计表2",DataTables("ER_SCJH"))
Dim dt2  As fxDataSource
bd2.Groups.AddDef("BM")
bd2.Groups.AddDef("DATE", "月")  
bd2.Totals.AddDef("BFPTjine", AggregateEnum.Count, "已配套合同_项数")
bd2.Totals.AddDef("BFPTjine", "已配套合同_当月")
bd2.Totals.AddDef("BFPTjine", "已配套合同_累计",True)
bd2.VerticalTotal = True
bd2.Filter = "[是否完成] = \'否\'and [PT] = \'是\'"
dt2 = bd2.BuildDataSource() 
Dim bd3 As New GroupTableBuilder("统计表3",DataTables("ER_SCJH"))
Dim dt3  As fxDataSource
bd3.Groups.AddDef("BM")
bd3.Groups.AddDef("DATE", "月")
bd3.Totals.AddDef("完成情况_欠交金额", AggregateEnum.Count, "未配套合同_项数")
bd3.Totals.AddDef("完成情况_欠交金额", "未配套合同_当月")
bd3.Totals.AddDef("完成情况_欠交金额", "未配套合同_累计",True)
bd3.VerticalTotal = True
bd3.Filter = "[是否完成] = \'否\' and [PT] <> \'是\'" 
dt3 = bd3.BuildDataSource()
dt1.Combine("bm",dt2,"bm")                    
dt1.Combine("BM",dt3,"BM")
Tables("统计_Table1").DataSource = dt1      

测试报错项是红字部分,   请问应该怎么改
[此贴子已经被作者于2020/8/6 10:48:32编辑过]

--  作者:有点蓝
--  发布时间:2020/8/6 10:51:00
--  

dim nms() as string = {"bm","月"}

dt1.Combine(nms,dt2,nms)
dt1.Combine(nms,dt3,nms