老师:
Tables("标录分析_Table01")是生成的查询表动态绑定到这个副表,“标录明细”是外部表(SQL),我的需求是:根据Tables("标录分析_Table01")表中的系统编号来生成另一个查询表【Tables("标录分析_Table06")】,但下面代码出错了,如何调整,谢谢!
Dim tb1 As Table = Tables("标录分析_Table01")
Dim tb6 As Table = Tables("标录分析_Table06")
Dim jb As New SQLJoinTableBuilder("标录明细汇总表","tb1.DataTable.Name")
jb.C
jb.AddTable("tb1.DataTable.Name","系统编号","标录明细","系统编号")
jb.AddCols("开标日期","开标时间","咨询类型","{标录明细}.系统编号","{标录明细}.项目名称","本期概算","标准基价","招标控制价","风险控制价","最高限价","最低限价","投标单位","中标候选人","开标地址","工程类别","投标球号","投标报价","评标基准价")
jb.AddExp("下浮率_招标控制价","Case When 招标控制价 > 0 And 投标报价 > 0 Then 1 - 投标报价 / 招标控制价 Else 0 End")
jb.AddExp("下浮率_风险控制价","Case When 风险控制价 > 0 And 投标报价 > 0 Then 1 - 投标报价 / 风险控制价 Else 0 End")
jb.AddExp("下浮率_最高限价","Case When 最高限价 > 0 And 投标报价 > 0 Then 1 - 投标报价 / 最高限价 Else 0 End")
jb.AddExp("下浮率_最低限价","Case When 最低限价 > 0 And 投标报价 > 0 Then 1 - 投标报价 / 最低限价 Else 0 End")
'jb.Build()
'MainTable = Tables("查询表1")
tb6.DataSource = jb.BuildDataSource