0

My requirement is remove blank line from the address. I am doing it like this:

=Ucase(REPLACE(REPLACE(Fields!Address.Value, CHR(13), ""), CHR(10), ""))

Screenshot

It removes the blank line, however the line-breaks is inserted into the middle of the zip code:

Hamilton, ON L8R

1E2 CAN

BIDeveloper
  • 2,628
  • 4
  • 36
  • 51
Gainster
  • 5,481
  • 19
  • 61
  • 90
  • So first of all, can you just provide perfect value for `Fields!Address.Value` - and it's type. As I wanted to check here from my report builder. Also, have you try to choose placeholder html type instead of simple textbox? – Pedram May 13 '16 at 03:58
  • I have to use simple text box – Gainster May 13 '16 at 04:11
  • okay do one thing, double click on textbox text and check html radio button inside properties window. Also let me know if it helps you or not.... – Pedram May 13 '16 at 06:44

1 Answers1

0

You need to replace the correct character to remove the line.

Try =UCASE(REPLACE(Fields!Address.Value, VBCRLF, ""))

That will replace all line feeds, if you only want to replace line feeds where there is an empty line you will need to look for VBCRLF + VBCRLF

=UCASE(REPLACE(Fields!Address.Value, VBCRLF + VBCRLF, VBCRLF))

This answer provides an alternative method of achieving the same result.

Community
  • 1
  • 1
BIDeveloper
  • 2,628
  • 4
  • 36
  • 51