Jump to content
We've recently updated our Privacy Statement, available here ×

Condition to display a chekbox checked or not on JasperSoftStudio.


christmoney1

Recommended Posts

Hello everybody, 

I've a question  on jasperststudio.

I would like to write et condition on the editor expression  to check or uncheck a chekbox .

For example  

$F{XVI-Etu : 05}== Yes  ? Checkbox checked: Checkbox unchecked

And then  i'll run the report i need to get this:  

 

thumb_checkbox.png.5a5316b8de96ee1bf0f9e2aefa72a2e7.png

 

There is someone who can i help me?

Sincerely.

Sedrick

 

 

 

 

 

 

 

 

  • Thanks 1
Link to comment
Share on other sites

1. Prepare the image for CheckOn.
2. Prepare the CheckOff image.
3. Place the image component.
4. Set an expression in Expression of the image component.

*How to write the expression
$F{XVI-Etu : 05}== Yes ? Checkbox checked URL of the image: Checkbox unchecked URL of the image

*Example of an expression
$F{XVI_Etu}.equals("05")?"https://4.bp.blogspot.com/-Gob19MXY9gM/UQJe7kIOrcI/AAAAAAAALJU/SemkME2AjZ8/s1600/checkbox_checked.png":"https://1.bp.blogspot.com/-PdZAsi0OTDY/UQJe7noA9mI/AAAAAAAALJQ/lYqZkPmrZNQ/s1600/checkbox_unchecked.png"


w20220128_checkbox.png.5b0ff2eaccf5a9ab12959d59dedda1e6.png

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...