If e.Table.Name = "统计"
If e.Col.IsDate AndAlso e.Col.Name. like "%年度" 'AndAlso e.Row.IsNull(e.Col) Then
'e.Text = Format(e.Row(e.Col), "yyyy年")
MessageBox.Show("年度")
Else If e.Col.IsDate AndAlso e.Col.Name Like "%月份" 'AndAlso e.Row.IsNull(e.Col) Then
'e.Text = Format(e.Row(e.Col), "yyyy年MM月")
MessageBox.Show("月份")
Else If e.Col.IsDate AndAlso e.Col.Name Like "%日期" 'AndAlso e.Row.IsNull(e.Col) Then
'e.Text = Format(e.Row(e.Col), "yyyyMMdd")
MessageBox.Show("日期")
Else If e.Col.IsDate AndAlso e.Col.Name Like "%时间" 'AndAlso e.Row.IsNull(e.Col) Then
'e.Text = Format(e.Row(e.Col), "yyyyMMdd HH:mm")
MessageBox.Show("时间")
End If
End If
经过测试,e.Col.Name. like "%年度" 没有判断出来,不知道正确的应该怎么写?