Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone please help me with this formula

Status
Not open for further replies.

nervous2

IS-IT--Management
Feb 24, 2003
125
CA
I am trying to say here if
{INMAST.Commoditykey} ="S" then font colour is blue but if

{INMAST.Commoditykey} ="RM or JS or LA or FD" then font colour is green

All other text is black

Please see formula below they problem is within the Else if {INMAST.Commoditykey} ="RM,JS,LA,FD" then color (0,145,27)
can you please tell me how to format the RM or JS or LA or FD part

THANKS

FORMULA HERE


if {INMAST.Commoditykey} ="S" then color(0, 0, 255)
ELSE if {@Available} <{INLOC.Minimumstockqty}
then color(250,0,0)
Else if {INMAST.Commoditykey} ="RM,JS,LA,FD" then color (0,145,27)
else color(0,0,0)
 
ELSE if {@Available} <{INLOC.Minimumstockqty}
then color(250,0,0)

What are you saying here? it looks like you havent assigned this case a value.

I would just say:
(IF {INMAST.Commoditykey} ="S" then color(0,0,250) ELSE
IF {INMAST.Commoditykey} ="RM,JS,LA,FD" then color (0,145,27) Else True
 
sorry, I missed something you need to say
IF {INMAST.Commoditykey} IN ["RM","JS","LA","FD"] then color (0,145,27) Else True

You are trying to pick out of an array. The computer took the entire entry "rm, js, la, fd" literally as all these must be met.
 
Thank you this worked, I wasn't sure on how to write the code.

 
You can actually just use the words:

If <<condition>> then blue
else if <<condition2>> then red
else defaultattribute

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top