Page 1 of 1

Terms Agreed Text

Posted: 04 Jul 2019, 14:01
by JoesJo
Hi ,

I am trying to adjust our invoice print template to show if a customer has credit terms agreed.

I can put on the field (SALES_LEDGER.TERMS_AGREED) easily enough but the data which is returned is either a "0" or a "1" depending on whether the box has been ticked or not

Is there a way with conditional formatting which can show predetermined text instead of the 1 or 0 eg:
if SALES_LEDGER.TERMS_AGREED = 1 "Terms Agreed"
if SALES_LEDGER.TERMS_AGREED = 0 "Terms Not Agreed"

Any suggestions would be greatly received.

Thank you :D

Re: Terms Agreed Text

Posted: 04 Jul 2019, 14:18
by brucedenney
"IF" statements in the report designer are weird!

This expression should work, not sure if the flag is number or text, assumed number, if it is text you need quote marks around the 1

SALES_LEDGER.TERMS_AGREED = 1?"Terms Agreed":"Terms NOT agreed"

----------------------------------------------------
Format of a basic If statement

A typical If statement uses the following format:

Condition ? Instruction 1 : Instruction 2

where:

The ? command is used to mean then.

The : command is used to mean else.


The expression is therefore saying:

If the condition is true THEN apply instruction 1, ELSE apply instruction 2.

When constructing the If statement, you must always include at least one condition, an instruction 1 and an instruction 2.

Format of a nested If statement

You can specify more than one condition with different results within one expression.

This is a nested If statement.
Nested If statements use the following format:

Condition 1 ? Instruction 1 : Condition 2 ? Instruction 2 : Instruction 3


The expression is therefore saying:

If condition 1 is true THEN apply instruction 1, ELSE if condition 2 is true THEN apply instruction 2, ELSE apply instruction 3.

When constructing a nested If statement, you must always end the statement with an else instruction to cover when the specified conditions aren't met.