Miles
Miles

Reputation: 5736

Force linebreak in VS05 SSRS textbox

In a VS05 SSRS report I have a field coming back from the database that I concatenated together.

Ex:

SELECT Field1 + ' ' + Field2

I'm wanting to show this in a single textbox on the report but with a line break between the two fields.

I've tried:

Field1 + '\r\n' + Field2

but of course, no luck.

What special characters can I use to force a line break in my cell?

Upvotes: 3

Views: 1836

Answers (1)

AUSteve
AUSteve

Reputation: 3248

You can add line breaks in SQL by concatenating CHAR(10) + CHAR(13) to your values.
However I'd advise you to do formatting in the report rather than the database. In this case you would use the Visual Basic character vbCrLf in the texbox.

Upvotes: 4

Related Questions