Conditionally Modify Label Text
- Last UpdatedMar 15, 2023
- 2 minute read
Conditionally formats label text.
-
Create a new report.
-
Bind the report to a data source.
-
On the Field List window, click the Field List tab and select any item in the dataset.
-
Right-click any item inside the dataset and select Add Calculated Field from the drop-down menu. The calculated field is added to the field list.

-
On the Field List window, click the created field to display the field properties on the Properties window.
-
On the Properties window, click the Properties tab.
-
Select String from the Field Type drop-down list.

-
Click the ellipsis next to Expression to display the Expression Editor window.

Define the required condition for the calculated field (for example, Iif([UnitsOnOrder] == 0, 'None', [UnitsOnOrder]), which means that if the UnitsOnOrder data field is equal to 0, the appropriate control's text is replaced with None).
-
Click OK to close the Expression Editor window.
-
Drag and drop the required field items, and the created calculated field, onto the Detail area of the report.

-
Click the Print Preview tab to display the result.
Refer to Create Layout Template / Report Definition and Bind Report to Dabacon Project Data for further information.