Conditionally Change a Label's Text
- Last UpdatedOct 22, 2025
- 2 minute read
To conditionally format a label's text
-
To create a calculated field, in the Field List, right-click any item inside the dataset, and from the menu, choose Add Calculated Field.

-
In the Property Grid, set the field's Field Type property to String.
-
Locate its Expression property and click the ellipsis.
-
The Expression Editor is then displayed.

-
In this window, define the required condition for the calculated field (for example, Iif([LoopNo] == null, 'None', [LoopNo]), which means that if the LoopNo data field's value is null, the appropriate control's text will be replaced with None).
-
To close the window, click OK.
-
Drag the required data fields (and the created calculated field as well) from the Field List onto the report's reportDetail band.

The report is now complete.
-
Switch to the Preview tab to view the result.
