以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- SQLJionTableBuilder中TableVisible = false不起作用,为什么? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=132116) |
-- 作者:wohenguaia -- 发布时间:2019/3/14 10:47:00 -- SQLJionTableBuilder中TableVisible = false不起作用,为什么? \'\'\'SQLJionTableBuilder,查询表生成器 If Tables.Contains("产品订单") Then MainTable = Tables("产品订单") syscmd.Table.delete MessageBox.Show("已删除‘产品总订单表’") Else Dim sjtb As New SQLJoinTableBuilder("产品订单","订单") sjtb.C sjtb.AddTable("订单","产品ID","产品","产品ID") sjtb.AddTable("订单","客户ID","客户","客户ID") sjtb.AddCols("产品名称","客户名称","单价","折扣","数量","日期") sjtb.AddExp("金额","单价 * 数量") sjtb.Caption = "产品总订单" sjtb.Filter = "{订单}.产品ID <> \'P02\'" sjtb.Order = "日期" sjtb.TableVisible = False sjtb.Top = "10 percent" sjtb.Build If Tables.Contains("产品订单") Then MainTable = Tables("产品订单") End If End If
|
-- 作者:有点甜 -- 发布时间:2019/3/14 10:53:00 -- 改成
sjtb.Build Tables("产品订单").visible = False |
-- 作者:wohenguaia -- 发布时间:2019/3/14 11:10:00 -- 那.TableVisible有什么用呢?或者说用在何处何时呢? |
-- 作者:有点甜 -- 发布时间:2019/3/14 11:14:00 -- 我测试下面代码,没问题
Dim sjtb As New SQLJoinTableBuilder("产品订单","表A") |
-- 作者:wohenguaia -- 发布时间:2019/3/14 11:20:00 -- 我也试了下,这次没问题了。 |
-- 作者:wohenguaia -- 发布时间:2019/3/14 11:23:00 -- 找到问题了!!! 添加了红色部分,.TableVisible就不起作用了 \'\'\'SQLJionTableBuilder,查询表生成器 If Tables.Contains("产品订单") Then MainTable = Tables("产品订单") syscmd.Table.delete MessageBox.Show("已删除‘产品总订单表’") Else Dim sjtb As New SQLJoinTableBuilder("产品订单","订单") sjtb.C sjtb.AddTable("订单","产品ID","产品","产品ID") sjtb.AddTable("订单","客户ID","客户","客户ID") sjtb.AddCols("产品名称","客户名称","单价","折扣","数量","日期") sjtb.AddExp("金额","单价 * 数量") sjtb.Caption = "产品总订单" sjtb.Filter = "{订单}.产品ID <> \'P02\'" sjtb.Order = "日期" sjtb.TableVisible = False sjtb.Top = "10 percent" sjtb.Build If Tables.Contains("产品订单") Then MainTable = Tables("产品订单") End If output.show(Tables("产品订单").Rows.Count) End If |
-- 作者:有点甜 -- 发布时间:2019/3/14 11:33:00 --
那你就删除对应的代码。你又隐藏又显示,是什么逻辑?
|
-- 作者:wohenguaia -- 发布时间:2019/3/14 14:17:00 -- ,学习嘛,各种搞 |