Change color based on field value in Jaspersoft Studio

Change color based on field value in Jaspersoft Studio

We may change the color, font size and style of the field value based on a condition.

For example, we have two fields called $F{numberofissues} and $F{projectname}. We want to highlight $F{projectname} by styling it with red color, font size 16 and bold style if the number of issue is greater or equal than 30.

1. Create a style


2. Under the style you created, create Conditional Style and enter the condition as expression:

$F{numberofissues} >=30


3. Select $F{projectname} field on the design area and choose the style you created on the properties.


This is all. When you run your report, the names of the projects will be styled based on number of issues.





#ireport, #jaspersoft-studio, #jasperstudio