-- 作者:唐尸三摆手
-- 发布时间:2011/5/27 8:49:00
-- 不存在名称为""的datatable
下面这段代码仍然报错:
Dim cmd As New SQLCommand Dim dt As DataTable cmd.Connection Name = "erp" cmd.CommandText = "select a.id_voucher,a.date_voucher,b.itemcode,b.num,c.classcode,d.classname from ata00000 a,atb00000 b,aaa00000 c,aam00000 d where a.id_voucher=b.id_voucher and b.itemcode=c.code and c.classcode=d.classcode and a.date_voucher between \'2011-05-01\' and \'2011-05-27\' and a.warehousecode=\'0110\'"
\'上面的sql语句没问题,测试正常 dt = cmd.ExecuteReader() Dim g As New CrossTableBuilder("统计表2",dt) g.HGroups.AddDef("classcode","分类编码") g.HGroups.AddDef("classname","分类名称") g.VGroups.AddDef("date_voucher",DateGroupEnum.None) g.Totals.AddDef("num") g.HorizontalTotal = True g.VerticalTotal = True g.Build(True) Tables("窗口1_Table1").DataSource = g.BuildDataSource()
此主题相关图片如下:screenshot312.jpg
此主题相关图片如下:screenshot315.jpg
|