Jump to content
Changes to the Jaspersoft community edition download ×

Creating a Variable with multiple bands


Recommended Posts

Hi All,

I am new to JasperSoft and I am having some difficulty with the coding of a variable - 

The variable I am trying to create is similar to that the concept of Bands - i.e - If amount less than 5K, display 5, if Amount greater than 5000.01 and smaller than 10K, display 10... so on.

The basis of the variable expression is as follows - 

( $F{amount}.compareTo( new java.math.BigDecimal("1") ) >= 1 ) ? "€ 5.00" : "NA" - I have tried creating seperate variables but everytime i add variables using the '+' function, it displays both the 5 and 10 and NA in the field. 

Any ideas on how I can overcome this? 


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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