JasperReport conditional styling

In Ireport you can create you own style, and that style can be applied to fields, labels and other objects. But you can also create conditional style, witch means you create you own style, and based on condition you applied that style to to object for instance.

In you sql select there is attribute called font_color witch has values B= black, R=red, G=green. and based on that attribute value you want to some record have different font color.

So you create 3 conditional style, one with black, red and green font color and set there expression. 

After that you set style to field, label.


Now you can run report and see how the magic works. : ]


Popular Posts