Add a variable from the condition explorer

Before you can add conditional formatting or conditional rendering to your report, you must add a variable. You can create a variable in the condition explorer or in the Properties pane.

Procedure

  1. Click the Conditional state icon Conditional state icon and click Variables.
  2. Click the Toolbox icon The toolbox icon, drag one of the following variables to the Variables pane:
    • To create a variable that has only two possible values, Yes and No, drag Boolean Variable.
    • To create a variable whose values are string-based, drag String Variable.
    • To create a variable whose values are different languages, drag Report Language Variable.
  3. If you created a Boolean variable, in the Expression Definition box, define the condition and click OK.

    For example, the following expression returns the value Yes if revenue is less than one million and the value No if revenue is greater than or equal to one million:

    [Revenue]<1000000

    For information about creating expressions, see Using relational calculations or Using Dimensional Calculations.

  4. If you created a string variable, do the following:
    • In the Expression Definition box, define the condition and click OK.

      For example, the following expression returns the value high if revenue is greater than one million and the value low if revenue is less than or equal to one million:

      if ([Revenue]>1000000) then ('high') else ('low')

      For information about creating expressions, see Using relational calculations or Using Dimensional Calculations.

    • Click the add button add icon in the Values pane.
    • For each value that the variable can assume, type the name of the value that corresponds with the possible outcomes defined in the expression.

      For example, in the previous expression, you must create two values for the variable, high and low.

      Tip: You can create a group by clicking two or more values and then clicking the group values button group values icon. For example, you can create a group that includes the available French languages.
  5. If you created a language-specific variable, in the Languages dialog box, select the languages to support.