Foxtable(狐表)用户栏目专家坐堂 → 查询表目录树出错


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

主题:查询表目录树出错

美女呀,离线,留言给我吧!
cjl333333333
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:200 积分:1706 威望:0 精华:0 注册:2015/2/3 17:04:00
查询表目录树出错  发帖心情 Post By:2021/6/27 15:38:00 [只看该作者]

Dim jb As new SQLJoinTableBuilder("库存表查询","库存表主表")
jb.C
jb.AddTable("库存表主表","单据编号","库存表","单据编号")
jb.AddCols("{库存表主表}.YEAR(日期) AS 年","{库存表主表}.单据编号","{库存表主表}.出入库存单位名称","{库存表主表}.承运人","{库存表主表}.出入库类型","{库存表主表}.出入库类型编号","{库存表主表}.简称","名称","编号","规格","类型","入库数量","出库数量","库存数量","单位","库存件数","重量","库存重量","备注","附件","生产单号","采购明细单号","订单编号","客户单号","包装","存放区","产品名称","入库件数","出库件数","结构","材质")
jb.AddExp("年","Year({库存表主表}.日期)",True)

JB.Build()

e.Form.Controls("TreeView1").BuildTree("库存表查询", "年|月|出入库类型|出入库存单位名称|类型|材质")


 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110497 积分:562369 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/27 22:07:00 [只看该作者]

jb.AddCols("{库存表主表}.日期","{库存表主表}.单据编号","{库存表主表}.出入库存单位名称","{库存表主表}.承运人","{库存表主表}.出入库类型","{库存表主表}.出入库类型编号","{库存表主表}.简称","名称","编号","规格","类型","入库数量","出库数量","库存数量","单位","库存件数","重量","库存重量","备注","附件","生产单号","采购明细单号","订单编号","客户单号","包装","存放区","产品名称","入库件数","出库件数","结构","材质")
jb.AddExp("年","Year({库存表主表}.日期)",True)
jb.AddExp("月","month({库存表主表}.日期)",True)
[此贴子已经被作者于2021/6/27 22:07:55编辑过]

 回到顶部
美女呀,离线,留言给我吧!
cjl333333333
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:200 积分:1706 威望:0 精华:0 注册:2015/2/3 17:04:00
  发帖心情 Post By:2021/6/28 9:35:00 [只看该作者]

选择列表中的列 '库存表.日期' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。


还是不对,老出来这个错误

 回到顶部
帅哥,在线噢!
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110497 积分:562369 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/28 9:38:00 [只看该作者]

贴出完整代码看看

 回到顶部