Foxtable(狐表)用户栏目专家坐堂 → 甘特图表头问题


  共有1768人关注过本帖平板打印复制链接

主题:甘特图表头问题

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


加好友 发短信
等级:五尾狐 帖子:1172 积分:8772 威望:0 精华:0 注册:2012/4/18 16:28:00
甘特图表头问题  发帖心情 Post By:2018/12/18 10:50:00 [只看该作者]

请教老师,下面代码的多层表头,怎样增加第三行表头为星期的“一二三四五六日”    如果在内部函数改成三层表头,其他地方是否还需要改代码

例如: 2018年12月

       1   2   3  4  5 ....

       六  日  一 二 三

 

Dim tbl As DataTable = Tables("项目时间总计划表").DataTable
Tables("窗口1_Table2").StopRedraw()
Dim StartDate As Date = tbl.Compute("Min(计划开始时间)", "计划开始时间 Is NOT NULL")
Dim EndDate As Date = tbl.Compute("Max(计划完成时间)","计划完成时间 Is NOT NULL")
Dim dt As Date = StartDate
Dim Builder As New DataTableBuilder("统计")
Do
    Dim nm As String = dt.Year & "年" &  dt.Month & "月_" & dt.Day
    Builder.Adddef(nm,Gettype(String),1)
    dt = dt.Adddays(1)
    If dt > Enddate Then
        Exit Do
    End If
Loop
Tables("窗口1_Table2").DataSource = Builder.buildDataSource
For Each cl As Col In Tables("窗口1_Table2").Cols
    cl.width = 30
Next
Functions.Execute("AddGanttRows")
Tables("窗口1_Table2").ResumeRedraw()

[此贴子已经被作者于2018/12/18 10:51:33编辑过]

 回到顶部