Alternating Row color depending on value
Hello,
i've a report with a checkbox (Checkbox1) and a rectangle shape in the back of the checkbox in the subreport.
Now i want to change the color of the shape depending on if the checkbox is checked.
For this i've added an EventHandler (VB)
But the curios is that the color of the following line(shape) is changed, not of the current.
how can i modify the script to fit my needs?
Thanx in advance, hematec
i've a report with a checkbox (Checkbox1) and a rectangle shape in the back of the checkbox in the subreport.
Now i want to change the color of the shape depending on if the checkbox is checked.
For this i've added an EventHandler (VB)
Private Sub CheckBox1_BeforePrint(ByVal sender As object, ByVal e As EventArgs)
      If checkbox1.Checked Then
        Shape1.FillColor=Color.Red
      Else
        Shape1.FillColor=Color.Transparent
      end if Â
    End Sub
But the curios is that the color of the following line(shape) is changed, not of the current.
how can i modify the script to fit my needs?
Thanx in advance, hematec
Comments
Use another event, AfterData, instead of BeforePrint. In the BeforePrint event, you cannot analyze the Checked property because the object is not filled with data yet.