java - Jasper Reports: How to conditionally set the textbox style? -


is possible in jasper reports conditionally set textbox style? if yes, how?

please note i'm aware of conditional styles, not need style varies on condition, set proper style using different condition each textbox (of course create conditional style each textbox, real pita...).

i'm using jasper reports 3.7.6 , jasper studio eclipse plugin.

thanks

use case example pseudocode:

 bean1 {     f1     f2 }  bean2 {     cond1     cond2 }  <textbox1 style="(bean2.cond1 ? style1 : style2)">     bean1.f1 </textbox1> <textbox2 style="(bean2.cond2 ? style1 : style2)">     bean1.f2 </textbox2> 

unfortunately can't define generic style. see page 135 of ireport ultimate guide: http://community.jaspersoft.com/documentation/ireport-ultimate-guide:

please note conditions cannot generic, instance, cannot set condition “if number positive” or “if string null .” must specific, specifying, example, particular value (field, parameter, variable or expression involving them) must positive
or null, , on.


Comments