Monday, February 13, 2012

Adding Carriage Return and Line Feeds to a text box

Hi All,

I am trying to print 10 values in a single cell in a text box.....

To make it readable I put carriage returns and line feeds into the boxes.

These rendered ok in visual studio but did not render ok in explorer....no carriage return or line feed.

This is what I added...

=Fields!segment_sdesc_00.Value & chr(10) & chr(13)

Can anyone advise me as to what is wrong with this? There must be a way to put a cr/lf or newline into a report in a text box.....

Thanks in Advance

Peter

www.peternolan.com

Try using the + sign over the ampersand.

Code Snippet

=Fields!segment_sdesc_00.Value + chr(10) + chr(13)

This has worked for me in Explorer so far.

|||

If you are working with SRS and need to combine two CRM fields together, but having each on its own line, use the following expression:

=Fields!ShipToName.Value & vbCRLF & Fields!ShipToAddress.Value

vbCRLF is a special system constant that contains the values of carriage return and line feed characters.

- Mitch Milam’s Microsoft Discussions

|||

Hi All,

thanks for the tips...will try both....

Peter

|||

Hi Simone,

some of the fields are numbers and from memory it complained about the plus sign when there was a mixture of numeric and string fields...but I will try again.

Thanks

Peter

No comments:

Post a Comment