Re: Field display on report question? by Linn
Linn
Tue Feb 07 09:16:49 CST 2006
Thanks Bernhard, Cindy, nice discussion. Here's how I handled it:
In the Field Properties - Expression:
ALLTRIM(NVL(lname, "")) + IIF(ISNULL(fname), " ", ", ") +
ALLTRIM(NVL(fname,""))
and in 'Print only when expression is true':
NOT ISNULL(lname)
and I turned on 'Remove line if blank."
Thanks for the tip Bernhard,
Linn
"Bernhard Sander" <fuchs@individsoft.de> wrote in message
news:OOHx6w%23KGHA.2124@TK2MSFTNGP14.phx.gbl...
> Hi Cindy
>
> >>> I would have thought that if it were null then I'd just get
> >>> 'lname, '
>
> >> alltrim(nvl(lname, "")) + ", " + alltrim(nvl(fname, ""))
>
>> One detail, the OP will want to deal with the comma if the LName is null
>> and therefore blank.
>
> In which other way do you think the OP wants to deal with the comma than
> what he will get with my proposal?
>
> If you want the comma to be only there if both, lname _and_ fname are not
> empty, there need to be more program logic. But the .NULL. issue must be
> solved in a similar way.
>
> Regards
> Bernhard Sander