Jump to content
Changes to the Jaspersoft community edition download ×

Display a text when value of the field match one value from a list of fixed values


Abdellatif.chouikh

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Considering you have a fixed list of values stored in the parameter, you can use the 'Print When Expression' of the text field to check whether the value exist in your list. If present, then the content of the text box will be displayed. If not, it will not appear. 

Link to comment
Share on other sites

Add one more property "Print When Expression" to your text field.

<printWhenExpression><![CDATA[YourCondition]]></printWhenExpression>[/code]

YourCondition to display your text field if it matches the condition.

YourCondition will be: 

java.util.Arrays.asList("Value A", "Value B", "Value C").contains($F{field_you_want_to_check})[/code]

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...