以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  sqlCrossTableBuilder 用sql 做表  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=119047)

--  作者:fubblyc
--  发布时间:2018/5/16 17:57:00
--  sqlCrossTableBuilder 用sql 做表
Dim sql As String = "SELEC T * FROM consume_report "
Dim b As New sqlCrossTableBuilder("统计表1",sql,"vip")   用sql语句会报错
\'Dim b As New sqlCrossTableBuilder("统计表1","consume_report")   直接用后台的表名没问题,可以出来统计表
b.C
b.HGroups.AddDef("image_time",DateGroupEnum.hour,"时段")
b.VGroups.AddDef("image_time",DateGroupEnum.week,"{0}周")
b.VGroups.AddDef("image_time",DateGroupEnum.month,"{0}月")
b.VGroups.AddDef("image_time",DateGroupEnum.day,"{0}日")
b.Totals.AddDef("msg_id",AggregateEnum.Count,"人数") 
b.filter = "mall_name = \'晋江吾悦广场店\'  and image_time >= \'2018-04-01\' and image_time <= \'2018-05-13\'"
b.HorizontalTotal = True
b.VerticalTotal = True
b.Build()
MainTable = Tables("统计表1")



图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20180516175544.png
图片点击可在新窗口打开查看


--  作者:有点甜
--  发布时间:2018/5/16 18:02:00
--  

不能用sqlCrossTableBuilder,要用CrossTableBuilder

 

http://www.foxtable.com/webhelp/scr/2307.htm

 

如果用sqlCrossTableBuilder,不需要sql语句,直接写表名即可。