Condition to display a chekbox checked or not on JasperSoftStudio.

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:  

 

 

There is someone who can i help me?

Sincerely.

Sedrick

 

 

 

 

 

 

 

 

christmoney1's picture
Joined: Apr 11 2021 - 1:54am
Last seen: 3 months 1 week ago

1 Answer:

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/SemkME2Aj...":"https://1.bp.blogspot.com/-PdZAsi0OTDY/UQJe7noA9mI/AAAAAAAALJQ/lYqZkPmrZ..."


yama818's picture
1835
Joined: Aug 17 2018 - 3:48pm
Last seen: 17 hours 27 min ago
Feedback