Jump to content

Conditional Styles in JasperStudio (no success)


ico.gnito

Recommended Posts

I am desperately trying to format the Field "FilmID" based on it's value. Could you provide me with a conditional expression to format values >= 3 in red color ?

I am now trying to use conditional formatting on a text string: $F{FilmName} == "Jurassic Park". This has no effect!

Thanks a lot in advance!

 

<style name="Style2">
        <conditionalStyle>
            <conditionExpression><![CDATA[$F{FilmName} == "Jurassic Park"]]></conditionExpression>
            <style mode="Opaque" backcolor="#3470E0"/>
        </conditionalStyle>
    </style>

*EDIT* I finally figured it out: Operators like == are for numerical values and for strings I use .equals(""). Conditional Formatting in Jasper is complicated^^.

 

Funnily != works for a string. So if I use Field == "ABC" it doesn't work but if I use Field != "ABC" it works. And if I use Field .equals("ABC") it also works.

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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