How to alter a color by its value in Section Report.

Question:

How can I alter the color on a line when printing a  Section Report of Elipse E3 according to the value in the field?

Solution:

To do so, use the Section Report’s  Detail_Format event, via a script that checks the value of the field’s Text property do campo and alters its ForeColor property accordingly.

Example:

Sub Detail_Format
If Val(Me.Field5.Text) >= 70 Then
Me.Field5.ForeColor = System.Drawing.Color.Red
ElseIf Val(Me.Field5.Text) < 30 Then
Me.Field5.ForeColor = System.Drawing.Color.Blue
Else
Me.Field5.ForeColor = System.Drawing.Color.Black
End If
End Sub

Attachments:

ChangeFieldColorOnFormat1.zip

NOTE: The attached application was developed with Elipse E3 v. 6.6.292.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *