要分别在不同单元格画字符,参考
If r.IsNull("计划销售数量") = False Then
Dim day As Integer = r("实际销售数量") / r("计划销售数量") * (dt2-dt1).TotalDays
Dim dt3 As Date = dt1.AddDays(day)
If dt <= dt3 Then
e.Graphics.FillRectangle(Brushes.Yellow,e.x ,e.y + 8, e.Width, e.Height - 16)
ElseIf (dt3-dt).TotolDays = 1 Then
Dim fnt As New Font("宋体",8)
Dim msg As String = format(r("实际销售数量") / r("计划销售数量") * 100, "0.00")
e.Graphics.DrawString(msg,fnt,Brushes.Red,e.x,e.y+2)
ElseIf (dt3-dt).TotolDays = 2 Then
Dim fnt As New Font("宋体",8)
Dim msg As String = "%"
e.Graphics.DrawString(msg,fnt,Brushes.Red,e.x,e.y+2)
End If
End If