pday Posted September 18, 2017 Share Posted September 18, 2017 Hello, I've been working on creating a conditional style for a text field in Jaspersoft Studios. I'm using a field called "Rec_Alias". I created a style called "conditional" and added two conditional styles beneath it. The XML looks like this: <style name="conditional"> <conditionalStyle> <conditionExpression><![CDATA[$F{Rec_Alias}.length() < 8 ? true : false]]></conditionExpression> <style fontSize="16"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$F{Rec_Alias}.length() > 7 ? true : false]]></conditionExpression> <style fontSize="8"/> </conditionalStyle> </style> However, when I test this out, the style doesn't actually do anyting. The text field's font stays at the normal 12 point font. Any assistance would be greatly appreciated!Patrick Link to comment Share on other sites More sharing options...
NhiTran Posted December 28, 2020 Share Posted December 28, 2020 Let's check your textField properties, if textElement has specified font size, font size won't override in conditional style.Solution: reomove font size in textElement properties Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now