Report Studio

Adding 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 add a variable in the condition explorer or in the Properties pane.

Steps in the Condition Explorer

  1. Pause the pointer over the condition explorer button and click Variables.
  2. In the Insertable Objects pane, drag one of the following variables to the Variables pane:
  3. To create a variable that has only two possible values, Yes and No, drag Boolean Variable.
  4. To create a variable whose values are string-based, drag String Variable.
  5. To create a variable whose values are different languages, drag Report Language Variable.
  1. 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 dollars and the value No if revenue is greater than or equal to one million.

    [Revenue]<1000000


    For information about creating expressions, see Using the Expression Editor.
  2. If you created a string variable, do the following:
  3. 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 dollars and the value low if revenue is less than or equal to one million dollars.
    if ([Revenue]>1000000) then ('high') else ('low')


    For information about creating expressions, see Using the Expression Editor.
  4. Click the add button under the Values pane.
  5. For each value that the variable can assume, type the name of the value that corresponds with the possible outcomes defined in the expression.
  6. Click OK.
    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.
  1. If you created a language-specific variable, in the Languages dialog box, select the languages you want to support and click OK.

    Tip:
    You can create a group by clicking two or more values and then clicking the group values button. For example, you can create a group that includes all of the different French languages available.

     

 

Related Topics: