Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Conditionally Change the Label Text

This document describes how to display different values in the report control based on the specified condition.

Do the following:

  1. Select the control and click the f button to invoke the Expression Editor:

    XRLabel Expression Smart Tag Editor

  2. Specify the following expression for the Text property:

    Iif([UnitsOnOrder] == 0, 'None', [UnitsOnOrder])
    

    This expression means that if the UnitsOnOrder data field value is 0 (zero), the label’s text is set to ‘None’; otherwise, the label displays the UnitsOnOrder field value.

    Expression Editor Label text IIF

  3. Switch to Print Preview to see the result:

    Conditionally Change Label Text - Result

See Also