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

a6vgvbt

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

$F{numberofissues} >=30

ds07myf

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

g0eaggz

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

 

 

 

 

Advertisements
This entry was posted in Jaspersoft Studio, Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s