Conditionally Change a Label's Text
This document describes how to display different values in a report control based on a specified logical condition.
After you bound your report to data and specified a bound data field in a report control's Expression property, you can make this control display different values based on a specified logical condition:
Invoke the control's smart tag and click its Expression property's ellipsis button.
In the invoked Expression Editor, specify the required expression.
Use the Iif function to define the condition. For example:
Iif([UnitsOnOrder] == 0, 'None', [UnitsOnOrder])
This expression means that if the data field's value is zero, the control's text is set to 'None'; otherwise, it displays the actual field value.
When switching to Print Preview, you can see the report control displaying the assigned values.
Evaluate as Caption
This property is enabled by default for all labels, table cells, and checkboxes added to a group header by the Quick Start tab. When this property is enabled, the control will evaluate a column expression reference as a caption header instead of a value in the column. This allows the ProReport to automatically translate a dynamic DAS caption such as <description><year> to become something like 'June 2019' for example.
This property should be disabled for the column reference in the detail band so that the actual value is shown.