views:

169

answers:

1

Hi,

How can i get a column in an SSRS 2005 report to render control chars like new lines and tabs?

For example:

SELECT
    VW.System_name + CHAR(13) + CHAR(9)  + ' > ' + VW.PTS_NAME + CHAR(13) + CHAR(9) + CHAR(9) + ' > ' + VW.FEED_NAME as Name

In SSRS (and SSMS Results to Grid Mode) table will render as:

 TRIPLE   > HYBRIDS    > HYBRID_CASHFLOWS

But i would like (as rendered in SSMS Results to Text Mode):

TRIPLE
 > HYBRIDS
     > HYBRID_CASHFLOWS

How can this be done in SSRS 2005?

Edit: the deleted answer suggesting i added CHAR(10) as well as CHAR(13) got the new lines working, but still no tabs.

+1  A: 

please see the below link :

http://dba.fyicenter.com/faq/sql_server/Inserting_New_Line_Characters_into_Strings.html

you can use these too:

new line = char(12)

space = char(32)

horizontal tab = char(9)

carriage return = char(15)

vertical tab = char(13)

end of text = char(3)
masoud ramezani