以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]数据提取汇总问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=159290) |
||||
-- 作者:cqlpjks -- 发布时间:2020/12/21 11:18:00 -- [求助]数据提取汇总问题
此主题相关图片如下:汇总统计结果.png |
||||
-- 作者:有点蓝 -- 发布时间:2020/12/21 12:17:00 --
|
||||
-- 作者:y2287958 -- 发布时间:2020/12/21 12:31:00 -- 要是我选择这么干。 \'\'\' Dim dws() As String = {"梁平中学","红旗中学","梁平一中","实中双桂","屏锦中学","袁驿中学","福禄中学"} Dim jb As New SQLJoinTableBuilder("查询表1","成绩库") jb.AddCols("年级","学科","大袋40份 as " & dws(0) & "_大袋40份","大袋30份 as " & dws(0) & "_大袋30份","小袋5份 as " & dws(0) & "_小袋5份","[大袋40份] * 40 + [大袋30份] * 30 + [小袋5份] * 5 as " & dws(0) & "_合计") jb.Filter = "年级=\'2018\' and 单位=\'" & dws(0) & "\'" Dim d As fxDataSource = jb.BuildDataSource() For i As Integer = 1 To dws.Length - 1 Dim jb1 As New SQLJoinTableBuilder("查询表1","成绩库") jb1.AddCols("年级","学科","大袋40份 as " & dws(i) & "_大袋40份","大袋30份 as " & dws(i) & "_大袋30份","小袋5份 as " & dws(i) & "_小袋5份","[大袋40份] * 40 + [大袋30份] * 30 + [小袋5份] * 5 as " & dws(i) & "_合计") jb1.Filter = "年级=\'2018\' and 单位=\'" & dws(i) & "\'" Dim d1 As fxDataSource = jb1.BuildDataSource() Dim Cols As String = "年级|学科" \'这个更容易维护(也即值可以保存于数据库中) d.Combine(Cols.split("|"),d1,Cols.split("|")) Next d.Show("查询表1") Tables("查询表1").AutoSizeCols MainTable = Tables("查询表1") |
||||
-- 作者:cqlpjks -- 发布时间:2020/12/21 13:58:00 -- 谢谢! |
||||
-- 作者:y2287958 -- 发布时间:2020/12/21 14:02:00 -- 新增记录,合并单元格 |
||||
-- 作者:cqlpjks -- 发布时间:2020/12/21 14:11:00 -- 新增记录、合并单元格我还没经历过,请指教。谢谢! |
||||
-- 作者:cqlpjks -- 发布时间:2020/12/21 14:29:00 -- 我的版本低了,打不开此文件。麻烦你转成低版本。谢谢! |
||||
-- 作者:有点蓝 -- 发布时间:2020/12/21 14:55:00 -- 回6楼,如果是输出execl,需要手工填充数据:http://www.foxtable.com/webhelp/topics/1147.htm,合并参考:http://www.foxtable.com/webhelp/topics/1153.htm 回7楼,购买升级服务,或者就看3楼的代码
|
||||
-- 作者:cqlpjks -- 发布时间:2020/12/21 15:06:00 -- 在输出execl前,统计汇总生成时就填充出来。请指教,谢谢! |
||||
-- 作者:有点蓝 -- 发布时间:2020/12/21 15:14:00 -- foxtable内部表格没有横向合并单元格的功能 |