Foxtable(狐表)用户栏目专家坐堂 → 多层表头错误


  共有2208人关注过本帖树形打印复制链接

主题:多层表头错误

帅哥哟,离线,有人找我吗?
yifan3429
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
多层表头错误  发帖心情 Post By:2018/4/4 11:52:00 [只看该作者]

     With wb.AddTable("","Table1")
                    Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"}
                    .Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") '第一层标题
                    .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") '第二层标题
                    .Head.AddRow(nms)
                    For Each r As DataRow In DataTables("每日业绩明细").sqlSelect("", "", "日期 Desc")
                        'For Each r As DataRow In DataTables("终端用户").sqlSelect("[报备人] = '" & name & "'", "", "日期 Desc")
                        With .Body.AddRow()
                            For Each nm As String In nms
                                .AddCell(r(nm))
                            Next
                        End With
                    Next
图片点击可在新窗口打开查看此主题相关图片如下:1111.jpg
图片点击可在新窗口打开查看
                End With
                e.WriteString(wb.Build)


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/4 12:31:00 [只看该作者]

要这样添加的,你要添加多少层,多少列,都是这样添加。全部都要写出来才行。

 

.Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") '第一层标题

.Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") '第二层标题

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2018/4/4 14:50:00 [只看该作者]

我是这样添加的呀 
Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"}
这个不是不要显示吗  但是他显示出来了。
你看下截图
[此贴子已经被作者于2018/4/4 15:02:29编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/4 15:10:00 [只看该作者]

你看不懂代码?

 

.Head.AddRow("部门名称","本月目标","今日","今日","今日","今日","今日","本月","本月","本月","本月") '第一层标题

.Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","累计", "成交人数","成交金额","达成率","累计") '第二层标题
[此贴子已经被作者于2018/4/4 15:10:48编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2018/4/4 19:40:00 [只看该作者]


.Head.AddRow("部门名称","本月目标","今日","今日","今日","今日","今日","本月","本月","本月","本月") '第一层标题

.Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","累计", "成交人数","成交金额","达成率","累计") '第二层标题
按照你的方法还是不行  现在还是三层表头  多出的字段没搞明白什么需求

Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"}
                    .Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") '第一层标题   对应三个今日  四个本月
                    .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") '第二层标题

这是帮助原吗  对应的字段

  '下面这个数组,用实际的列名.

            Dim nms() As String = {"产品","东部_一季度","东部_二季度","东部_三季度","东部_四季度","南部_一季度","南部_二季度","南部_三季度","南部_四季度"}

            .Head.AddRow("产品","东部","东部","东部","东部","西部","西部","西部","西部"'第一层标题

            .Head.AddRow("产品","一季度","二季度","三季度","四季度","一季度","二季度","三季度","四季度"'第二层标题


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/4 19:56:00 [只看该作者]

删除你这句代码啊  .Head.AddRow(nms)

 回到顶部