Conditional Styling in JasperSoft
Last updated
Was this helpful?
Last updated
Was this helpful?
To create conditional styles in JSS:
Navigate to the top of the Outline tab.
Right-click on the Styles category.
Select Create Style
Select the newly created Style1 in the Styles category.
Click on Properties Tab > Style
Name your style (change from default “Style1”
Set the default font/font size for your style
Click on Appearance
Set the default Forecolor and Backcolor if necessary.
Forecolor controls the text color.
Backcolor controls the “Fill” or Background color.
NOTE: If you use a Backcolor, be sure to uncheck the “Transparent” box or your Backcolor will not show.
Navigate to the Outline tab.
Right-click on your style.
Double-click on NO CONDITION SET
In the Expression Editor, enter your 1st condition.
Select the condition under your style in the Outline
Navigate to Properties Tab
Use Appearance, Border, & Style to set your conditional style
Right-click on your style.
Select Create Conditional Style
Double-click on NO CONDITION SET
In the Expression Editor, enter your 1st condition.
Select the condition under your style in the Outline
Navigate to Properties Tab
Use Appearance, Border, & Style to set your conditional style
Select a field on your report canvas
Navigate to the Properties tab
Under Appearance, select your conditional style from the drop-down menu.
Create your conditions in a logical order. The style from the first true condition will be applied to your field.
Why isn't my conditional style working? Any styling that was manually applied to your field(s) over-rides your conditional styling.
If your conditional styling isn't working, select your field and navigate to Properties > Inheritance. Remove any styling in the Element Attributes area.
Select Create Conditional Style