Define Case Expression
Anyone know that:
Can I define Case expression inside Menu-->Report-->Variables, such as crystal report as below:
SELECT {FIELD A}
CASE '1':
IF {VENDOR.CNAME} <>'' THEN {VENDOR.CNAME} ELSE {VENDOR.ENAME}
CASE '2':
IF {DEBTOR.CNAME} <>'' THEN {DEBTOR.CNAME} ELSE {DEBTOR.ENAME}
CASE '3':
'No Related Information';
Can I define Case expression inside Menu-->Report-->Variables, such as crystal report as below:
SELECT {FIELD A}
CASE '1':
IF {VENDOR.CNAME} <>'' THEN {VENDOR.CNAME} ELSE {VENDOR.ENAME}
CASE '2':
IF {DEBTOR.CNAME} <>'' THEN {DEBTOR.CNAME} ELSE {DEBTOR.ENAME}
CASE '3':
'No Related Information';
Comments
but you can write it in the obp event of the memo or band to fill the text of the memo with the correct
expression note the apostrophes and []
delphi code sample
case <integer value>of
1:
IF {VENDOR.CNAME} <>'' THEN memo1.memo.text :='[VENDOR."CNAME"]' ELSE memo1.memo.text := '[VENDOR."ENAME"]'
2:
3:
end;
but you can write it in the obp event of the memo or band to fill the text of the memo with the correct
expression note the apostrophes and []
delphi code sample
case <integer value>of
1:
IF {VENDOR.CNAME} <>'' THEN memo1.memo.text :='[VENDOR."CNAME"]' ELSE memo1.memo.text := '[VENDOR."ENAME"]'
2:
3:
end;