以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  紧急求助呀,统计分组  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=30890)

--  作者:wuxianzuoji41
--  发布时间:2013/4/6 9:36:00
--  紧急求助呀,统计分组

界面放上一个DateTimePicker1,想按照日期分组统计

Dim g As New CrossTableBuilder("统计表2", DataTables("crm_sale"), "[sell_date] >= \'2013-1-1\'")
g.HGroups.AddDef("sell_date", DateGroupEnum.Year, "年")
g.HGroups.AddDef("sell_date", "月")
g.HGroups.AddDef("sell_date", DateGroupEnum.Week, "周")
g.VGroups.AddDef("seller")
g.Totals.AddDef("totalMoney", "totalMoney")
g.OrderByTotal = True
g.HorizontalTotal = True
g.VerticalTotal = True
g.Filter = "[sell_date]>=#" & e.form.Controls("DateTimePicker1") & "#"

g.Subtotal = True
g.FromServer = True
g.Build()
MainTable = Tables("统计表2")

 

g.Filter = "[sell_date]>=#" & e.form.Controls("DateTimePicker1") & "#" 这个是我自己填写的,运行提示“没有为字符串"[sell_date]>=# 和类型DateTimePicker定义运算符 ”&“在,这个错误,该怎么处理呀?

 


--  作者:fjlclxj
--  发布时间:2013/4/6 12:25:00
--  
e.form.Controls("DateTimePicker1").text