生成统计表后,按钮或者命令窗口执行 DataTables("统计表1").GlobalHandler.DrawCell = True
到项目全局DrawCell 事件写代码
If e.Table.Name = "统计表1" Then '其它代码 End If
|
按照有点蓝老师的做法(如上),无法实现,
周日的样式,应该在那里建立
以下是全局DrawCell 代码
If e.Table.Name = "CQ" Then
Dim y As String = Forms("生产出勤管理").Controls("Com年").text
Dim m As String = Forms("生产出勤管理").Controls("Com月").text
For Each c As Col In e.Table.Cols
If c.Name <> "部门" AndAlso c.Name <> "姓名" AndAlso c.Name <> "班次" Then
Dim de As Date = "#" & m & "/" & c.Caption & "/" & y & "#"
Dim dw As Integer = de.DayOfWeek
If dw = 0 Then e.Style = "周日"
End If
Next
End If