all groups > sql server reporting services > may 2006 >
You're in the

sql server reporting services

group:

Adding Linebreaks at specified positions in a string


RE: Adding Linebreaks at specified positions in a string chicagoclone
5/8/2006 9:35:02 AM
sql server reporting services: system.Environment.NewLine

this should give you a new line

[quoted text, click to view]
Adding Linebreaks at specified positions in a string Elliot Rodriguez
5/8/2006 12:02:18 PM
I have a record with a row that can contain a long comma delimited string.

In my ASP.NET version of my report, I have a small routine that checks if
this string exceeds X number of characters. If so, then I add a breaking
character after a comma where the comma appears either exactly at X or X +
however many more characters I have to go before I get to the next comma.

For example - if my string is 40 characters and I want a break after every
10th character, if the 10th character is a comma then I simply add it there.
Otherwise, if the comma is the 11th character then I'll at it after that (10
+ 1). This is to ensure that a value is not "split" on 2 separate lines.

I need to do the same thing for my RS version of this report. The field
looks like it is constrained by the width I put on it in the designer, but I
want to control when the breaks are inserted.

The Expressions box recognizes vbCrLf as a valid keyword, but I am having
trouble coming up with the full expression.

AddThis Social Bookmark Button