-- 甘特图出错,请老师核查代码,谢谢
If DrawGannt Then
Dim r As Row = Tables("进口业务进度表").Rows(e.Row.Index)
Dim dt1 As Date = r("接单日期")
Dim dt2 As Date = r("到港日期")
Dim dt3 As Date = r("报关完结")
Dim dt4 As Date = r("送货日期")
Dim dt As Date = e.Col.Name.Replace("年","-").Replace("月_","-")
If dt>=dt1 AndAlso dt<=dt2 Then
e.StartDraw()
If dt < Date.Today Then
e.Graphics.FillRectangle(Brushes.Green,e.x ,e.y + 5, e.Width, e.Height - 10)
Else
e.Graphics.FillRectangle(Brushes.Red,e.x ,e.y + 3, e.Width, e.Height - 7)
End If
e.EndDraw()
End If
If dt>=dt2 AndAlso dt<=dt3 Then
e.StartDraw()
If dt < Date.Today Then
e.Graphics.FillRectangle(Brushes.Yellow,e.x ,e.y + 5, e.Width, e.Height - 10)
Else
e.Graphics.FillRectangle(Brushes.Red,e.x ,e.y + 3, e.Width, e.Height - 7)
End If
e.EndDraw()
End If
If dt>=dt3 AndAlso dt<=dt4 Then
e.StartDraw()
If dt < Date.Today Then
e.Graphics.FillRectangle(Brushes.Blue,e.x ,e.y + 5, e.Width, e.Height - 10)
Else
e.Graphics.FillRectangle(Brushes.Red,e.x ,e.y + 3, e.Width, e.Height - 7)
End If
e.EndDraw()
End If
End If
错误信息:
编译错误:未声明名称 \'drawgannt\'
错误代码:if drawgannt then