Ming Huang Ming Huang - 2 months ago 12
SQL Question

concatenating fields with no line break in SSRS

I want to concatenate couple fields into one line using expression in SSRS

=Fields!Address1.Value & Fields!Address2.Value +" " + Fields!City.Value + " " + Fields!State.Value

But all the fields have a line break. It is driving me nuts. I need to get rid of the line break.

I also tried this in my query:

Concat(loc.Address1, loc.Address2,loc.City, loc.State) AS FullAddress

Still won't work.


Use this in your expression: This is to replace char(10) (also known as vblf line break) with empty string "". It should get you the result.

Replace(Fields!Address1.Value & Fields!Address2.Value +" " + Fields!City.Value + " " + Fields!State.Value),char(10),"")