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

Changing Font Style based on conditional


chandesaisalvin

Recommended Posts

Hi

I have been tinkering wtih this software for the first time for about a week.

TLDR;

So on my price label I have       . . .   

"$" + ($F{pro_price1} == null ? $F{Price1}.setScale(2) : $F{pro_price1}.setScale(2))

I have a suggested price which is 

"SRP: $" + $F{Sugg_Price}.setScale(2)                  . . . . This is in a different body

 

I went to style, add a condition,     I added a condition where  $F{Price1}<$F{Sugg_Price}     than selected lets say Time New Roman and the font size. 
So I want the font to change where if the Price is less than the SRP it is a font I selected.

 

 

 

I enter it into my POS website and get an error like so 

1. The operator < is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = ((java.math.BigDecimal)field_Price1.getValue())<((java.math.BigDecimal)field_Sugg_Price.getValue()); //$JR_EXPR_ID=13$ <-------------------------------------------------------------------------------------------------> 2. The operator < is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = ((java.math.BigDecimal)field_Price1.getOldValue())<((java.math.BigDecimal)field_Sugg_Price.getOldValue()); //$JR_EXPR_ID=13$ <-------------------------------------------------------------------------------------------------------> 3. The operator < is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = ((java.math.BigDecimal)field_Price1.getValue())<((java.math.BigDecimal)field_Sugg_Price.getValue()); //$JR_EXPR_ID=13$ <-------------------------------------------------------------------------------------------------> 3 errors .

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