07-06-2018 11:59 AM
Is there a way to have the font color change for the report based on the determination found in the script?
For example this script checks to see if a value was exceeded and reports yes or no on an alert page of the report.
If Data.Root.ChannelGroups(1).Channels("Speed (rpm)").Maximum > 6300.1 Then
T1 = "YES"
Else
T1 = "No"
End If
I would like the YES text to be green and the No text to be red. Is this possible?
Thanks!!!
Solved! Go to Solution.
07-09-2018 02:20 AM
Hi Karen,
You can place the text box you need, select it and right-click on it to rename it. In my example I name it MyText. Then you can use something like this to programatically change the color.
Call Report.ActiveSheet.Objects("MyText").Font.Color.SetPredefinedColor(ePredefinedColorRed) Call Report.Refresh
You have another example here with a comment box : http://zone.ni.com/reference/en-XX/help/370858M-01/reportapi/properties/report_property_color_irepfo...