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

Conditional style for text font size


pday

Recommended Posts

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

  • 3 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...