pjohns
6th March 2012, 17:48
Hello,

I have set a condtion on a report field of -

tdsls040.cotp <> "MOD"

If my order type is "MOD" then the field does not get printied as expected.

When I add another test to the condition -

tdsls040.cotp <> "MOD" or tdsls040.cotp <> "MAC"

This does not work, the field prints regardless of order type and I'm guessing it's down to syntax. Can somebody please help me with the correct syntax?

Thanks in advance.

tomlbacon
6th March 2012, 21:13
Use the and instead of the or

JaapJD
6th March 2012, 21:20
This condition is always true. If cotp is "MOD" then it is unequal to "MAC". The other way round also applies. So the "or" is a problem.
Correct would be (if you want to print for all other values than "MOD" and "MAC"):

tdsls040.cotp <> "MOD" and tdsls040.cotp <> "MAC"

or

not (tdsls040.cotp = "MOD" or tdsls040.cotp = "MAC")

or (easy to extend)

pos("MOD,MAC", tdsls040.cotp) = 0

pjohns
7th March 2012, 09:34
Thank you both for your replies.

Jaap -Thank you for your examples this resolved my problem.