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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Comparison question 1

Status
Not open for further replies.

cbarrol

IS-IT--Management
Sep 4, 2001
105
US
Hello,
I am using CR7 and trying to compare 2 string fields in an Access DB.

If there is nothing in ({Estim.User_Text4}) then Crystal will print what ever is in {Estim.VendCode1}
However if there IS something in ({Estim.User_Text4}) then that is what will be printed.

Here is the formula I used:
if isnull({Estim.User_Text4}) then {Estim.VendCode1}
else {Estim.User_Text4}

It does not seem to be working. There are records that (I verified this) have nothing in {Estim.User_Text4} AND DO HAVE TEXT IN {Estim.VendCode1} but {Estim.VendCode1} does not show up on the report.

Any Ideas on what I did wrong?
Thanks,
Craig Barroll

 
I have seen isnull() fail in various databases, such as Pervasive. Here's how I got around it:

Code:
if isnull({Field1}) or length(trim({Field1}))=0 then {field2} else {field1}

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top