Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: NEWBIE! Formula in CR8 stops at first condition ?
What does mean EMPTY? Is it null value or zero-string? Maybe you should check if it is a NULL value. I am not positive how CR append strings to null value. In VB, for instance, when you want to assign some value to string variable from text type database field, you should do it like this
This was no error will occur if this field has NULL value. So if this logic can be used in CR, then this might work
adr1 = {KUNDE.Z_LINIE1} & ""
adr2 = {KUNDE.Z_LINIE2} & ""
adr3 = {KUNDE.Z_LINIE3} & ""
adr4 = {KUNDE.Z_LINIE4} & ""
if Length(adr1) > 0 then
adr1 = adr1 & chr(10)
end if
if Length(adr2) > 0 then
adr2 = adr2 & chr(10)
end if
if Length(ad3) > 0 then
adr3 = adr3 & chr(10)
end if
formula = adr1 & adr2 & adr3 & adr4 |
____________________________
If you find the answer helpful, please mark this topic as solved.
|