my if else statemate can not run

0

I hope my word space can large if santance is short

and have small word space when the santance is long

this is my code

$F{youad}.length()<10 ? <paragraph lineSpacing="Proportional" lineSpacingSize="1.4"/> :
<paragraph lineSpacing="Proportional" lineSpacingSize="0.4"/> 

why it can not run

help me

thanks

cool3690's picture
Joined: Sep 18 2018 - 12:52am
Last seen: 5 months 6 days ago

Is this code being run against a text control? While I don't believe that is going work, perhaps what you can do is set the 'print when' expression of 

this control to print it if the condition is met, and if not, print another text control that has the dimensions you want based on the same test condition

except that you'd test for the opposite case.

dszeto - 10 months 3 weeks ago

1 Answer:

0

FYI, linespacing is spacing between "lines" and not between characters or words.

JasperReports also does not support dynamic attribute changes. You'll need to pre-define different text areas with different properties and select which one to print out instead.

hozawa's picture
47047
Joined: Apr 24 2010 - 4:31pm
Last seen: 2 months 2 weeks ago
Feedback