Jump to content

IF statements in a Variable on a report.


Go to solution Solved by ernst_2,

Recommended Posts

Posted

I have a varaible basically I want it to say OK if the markup is over 40% for most items, but for items under $25 I want the mark up to be OK if it is over 80%.    This is what I am trying to get to work, but I am getting an error at the AND operator:

IF($F{lastcost} >= ($F{sellprice} /1.40),"Low Sell",IF(($F{lastcost} >= ($F{sellprice} / 1.80)) AND ($F{lastcost} < 25),"Low Sell","OK"))

 

I expect my problem is the use of AND.   Pretty new to Jasper, so could be just about anything.

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution
Posted

try:

($F{lastcost} >= ($F{sellprice} /1.40) ? "Low Sell" : ($F{lastcost} >= ($F{sellprice} / 1.80) && ($F{lastcost} < 25) ? "Low Sell" : "OK"))

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