question

nileshamruskarsqlserver avatar image
nileshamruskarsqlserver asked

How To Replace mupltiple spaces in SSRS Report

I have a column which stores data in html format. At present have handled most of the tags through my query. But unfortunately I am unable to handle multple spaces in between the text for eg : check attachment [link text][1]. This is just an example but in my column its a huge text and at some part there are lot of space as shown in above example. In custom report its showing too much spaces. How can I replace multiple spaces to single space? is there any custom code and if yes can some provide one or any inbuilt function which can help me out or how can I handle at tsql level. Please provide script if any. Thank you [1]: /storage/temp/ 3334-new.txt
ssrsssrs-2008-r2ssrs-2012business-intelligencessrs bids
new.txt (927 B)
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
jason_clark03 avatar image
jason_clark03 answered
**Even tidier:** select string = replace(replace(replace(' select single spaces',' ','<>'),'><',''),'<>',' ') You can also use = replace(Fields!Paramater.Value," ","")
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Appreciate the response. I have already applied the same fix which you provided and it worked for me = replace(Fields!Paramater.Value," ","") Thank you !
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.