cancel
Showing results for 
Search instead for 
Did you mean: 

formula to combine multiple fields on one column

Former Member
0 Kudos

Hi All,

How do you create a formula in the formula editor that allows you combine several fields onto one column. An example: if I wanted to combine a street address onto one column when it is several fields in the data base. I know I need to seriously work on my coding, because it probbably is not that difficult. I've tried slect statementw with Case True and different If then else statements, but I am not getting all of value to return.

Regards-

Accepted Solutions (1)

Accepted Solutions (1)

former_member230846
Contributor
0 Kudos

Hi Kyle,

By the sounds of your description, in Crystal Reports you can create a formula to concatenate string type database fields. For example,

{database.field1} + " " + {database.field2} + " " + {database.field3}

If this is not what you're looking for please reply with additional information.

Regards,

Wallie

Former Member
0 Kudos

Thanks for the response. Yes, I've tried that. I think part of my problem is that in the report it uses two tables that are actually the same one is just named differently. I am getting null values, but there should not be null values.

Former Member
0 Kudos

Hi Kyle,

To avoid null values you need to convert "Default values for nulls" in the formula editor.

Edit your formula

{database.field1} + " " + {database.field2} + " " + {database.field3}

and in formula editor at the top you can see a dropdown list with "Exception for nulls" change this and select "Default values for nulls"

Now you can avoid the nulss in output

Regards,

Raghavendra

Former Member
0 Kudos

Thanks to everyone who responded- very helpful and much appreciated

Answers (1)

Answers (1)

BasicTek
Advisor
Advisor
0 Kudos

This sounds like a reporting question. What reporting software are you using? I'll transfer your post for you.

Regards,

Tim

Former Member
0 Kudos

Sorry about that. I intended to post in the Crystal Reports Designer forum. I'm using Crystal Reports XI releade 2.

BasicTek
Advisor
Advisor
0 Kudos

no problem I moved the post to the CR design forum. Hopefully you will get more responses here.