×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled
2

Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

(OP)
I am trying to create a formula to concatenate 5 notes fields and each of these note field can be either NULL, blank or filled. When I try note1 & note2 & note3 & note4 & note 5 I get no results if any of these fields are NULL or blank.

Is there a formula to show a blank space if the field is null or blank but show the field if not for 5 fields in a row ?

Note1 = NULL
Note2 = Hello
Note3 = ""
Note4 = Ladies
Note5 = and gentlemen

Results:
Hello Ladies and gentlemen

RE: Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

Have you set the formula Workshop to Default Values for Nulls instead of Exceptions for Nulls. If so, then then there are other work arounds to check for empty (Null) strings.

RE: Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

(OP)
It was not set to Default Values For Nulls but by formula still isn't working

RE: Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

(OP)
Clarification, it is now set the Default values.

RE: Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

Write formulas like this (assuming these are actually different fields and not separate instances of the same field):

//{@note1}:
If isnull({table.note1}) or
Trim({table.note1})=“” then
“” else
{table.note}+” “//replace my iPad quotes with your own quotes in all places

Repeat for other fields and then concatenation:

{@note1}+{@note2}+//etc

-LB

RE: Crystal 2011 Concatenating multiple fields that could be NULL, blank or filled

FYI: I have noticed that some string fields do not get flagged as NULL. Using Ken Hamady's solution. Check for a string length of 0 (i.e., if len({table.note1}) = 0 )

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close