Jump to content
Changes to the Jaspersoft community edition download ×

Error Evaluating Decimal Value


brian.berrelez
Go to solution Solved by brian.berrelez,

Recommended Posts

I'm trying to conditionally format a value on my report if it is negative but I am not able to evaluate if a value is less than Zero or not.

I'm still new to Jaspersoft. Here is my custom formatting method.

<style name="NegativeAverage">    <conditionalStyle>        <conditionExpression>            <![CDATA[new Boolean($F{AVERAGE_BALANCE} < 0.00 ? Boolean.TRUE : Boolean.False]]>        </conditionExpression>        <style isBold="true"/>    </conditionalStyle></style>[/code]

Errors:

Errors were encountered when compiling report expressions class file: 1. Syntax error, insert ")" to complete Expression value = new Boolean(((java.math.BigDecimal)field_AVERAGE_BALANCE.getValue()) < 0.00 ? Boolean.TRUE : Boolean.False; //$JR_EXPR_ID=14$ <---> 2. Syntax error, insert ")" to complete Expression value = new Boolean(((java.math.BigDecimal)field_AVERAGE_BALANCE.getOldValue()) < 0.00 ? Boolean.TRUE : Boolean.False; //$JR_EXPR_ID=14$ <---> 3. Syntax error, insert ")" to complete Expression value = new Boolean(((java.math.BigDecimal)field_AVERAGE_BALANCE.getValue()) < 0.00 ? Boolean.TRUE : Boolean.False; //$JR_EXPR_ID=14$ <---> 3 errors[/code]

Any help is greatly appreciated.

 

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