Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank field gets omitted 1

Status
Not open for further replies.

CRilliterate

Technical User
Dec 7, 2005
467
US
I ran into problem. I have records that are :

CusID LName CoNAme

001 Fran Doob
002 Cole Sop Integra
003 Tom Frok Tom Frok

If CoName is empty I need to display LName, if CoName and if Lname is the same I need to display CoName

Output is :
CusId (always)
CoName (If exists, if not supress blank field)
LName (If exists but if = to CoName - suppress balnk because CoName already displayed at line2)

So I wrote:

{@IND_Do_Not_Show}is a formula that determines if record id Individual record. It works.

Then on top of it I wrote:

If {@IND_Do_Not_Show}<>{Tbl.CoNAme}then {@IND_Do_Not_Show} else ""

which says 'if Lname is the same I need to display CoName'

but it only works if LName and CoName are populated. It doesn't display anything when CoNAme is blank...Help???

CusID LName CoNAme

001 Fran Doob



________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Try:

if isnull({table.CoName})
or
trim({table.coName}) = "" then
{table.Lname}
else
{table.CoName}

-k
 
Thanks!

________________________________________
I am using Windows XP, Crystal Reports 9.0 with SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top