求指导:1.如何将单元格的数值列和绘图分开,绘图单独一列。如图所示:
将绘图分别在图示1和图示2的2个列内绘制。
此主题相关图片如下:1-1.png

此主题相关图片如下:1-2.png

2.如何将代码里“总计值”换成“自动求和值”
If e.Col.Name = "检验数" AndAlso e.Row.IsNull("检验数") = False Then e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row("检验数") \ 12345
If e.Row("检验数") = 100 Then
e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
Else
e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
End If
e.EndDraw()
End If
If e.Col.Name = "不合格数" AndAlso e.Row.IsNull("不合格数") = False Then
e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row("不合格数") \ 142
If e.Row("不合格数") = 100 Then
e.Graphics.FillRectangle(Brushes.red,e.x + 1,e.y + 1, Width, e.Height - 2)
Else
e.Graphics.FillRectangle(Brushes.red,e.x + 1,e.y + 1, Width, e.Height - 2)
End If
e.EndDraw()
End If
3.如何在合计栏最后一个单元格内实现“求值”。
142/12344=1.15%