sanjay_emp
29th August 2002, 16:48
Hi friends
How can I replace a Number field to Character
when its value is ZERO using a single domain.

For example:
If X is in Domain of Number/Integer
I need to print
X= "Nill" if X=0
Is there any Domain which takes care of this situation ?
I am using BaanIVc4

Thanks in advance
Sanjay

lbencic
29th August 2002, 17:11
You can use the Print Expression on the field in the report to evaluate an expression and print what you want. Usually, you would have something like:

Print Expression: X
Domain: tcmcs.long

Instead, use:

Print Expression: X=0 ? "Nill" : str$(X)
Domain: tcmcs.str10

The expression X=0 is evaluated. Nill is printed if it's true, the string value of X is printed if it's false. Either way, the output domain is a string.

Hope that helps

dbinderbr
30th August 2002, 20:44
Sanjay gave you the best solution, domains dont care about it by itself.