Dim g As New SQLGroupTableBuilder("查询统计","KCCKD2")
g.C
g.AddTable("kcckd2","kcckd2_lsbh","kcckd1","kcckd1_lsbh")
g.AddTable("kcckd2","kcckd2_wlbh","lswlzd","lswlzd_wlbh")
g.AddTable("kcckd1","kcckd1_bmbh","kcbmzd","kcbmzd_bmbh")
g.AddTable("kcckd1","kcckd1_ckbh","lsckzd","lsckzd_ckbh")
g.AddTable("kcckd1","kcckd1_lyr","zwzgzd","zwzgzd_zgbh")
g.AddTable("lswlzd","lswlzd_jldw","jsjldw","jsjldw_dwdm")
g.AddTable("lswlzd","lswlzd_lbbh","lswllb","lswllb_lbbh")
g.Caption = "统计表 "
g.Groups.AddExp("年月份","kcckd1_djrq.Substring(0,6)")
g.Groups.AddDef("kcckd1_sjdh","出库单号")
g.Groups.AddDef("kcbmzd_bmmc","单位名称")
g.Groups.AddDef("zwzgzd_zgxm","出库车号")
g.Groups.AddDef("lsckzd_ckmc","仓库名称")
g.Groups.AddDef("lswllb_lbbh","类别编号")
g.Groups.AddDef("lswllb_lbmc","物料类别")
g.Groups.AddDef("kcckd2_wlbh","物料编号")
g.Groups.Adddef("lswlzd_wlmc","物料名称")
g.Groups.Adddef("lswlzd_ggxh","规格型号")
g.Groups.Adddef("jsjldw_dwmc","计量单位")
g.Totals.Adddef("kcckd2_sl","领用数量")
g.Totals.AddDef("kcckd2_dj","出库单价")
g.Totals.AddDef ("kcckd2_je","金额")
g.Groups.AddDef("kcckd1_bz","出库备注说明")
g.Subtotal = True
g.SubtotalLevel = 1
Tables(e.Form.Name & "_Table1").DataSource = g.BuildDataSource
Tables(e.Form.Name & "_Table1").AutoSizeCols
------------------------
以上是代码,不知道是什么原因,请问上面红色的代码有问题吗?那个是单据日期格式为:20120202 ,8位字符的,我想增加一列取前6位,生成一个列,根据这个列进行分组统计,添加列不能这样做吗?
错误提示:
此主题相关图片如下:qq截图20131205215046.png