In a report, I have a textbox... and I want to make a new line in the
expression builder...
I tried that
=Fields!ShipToName.Value & "\n" & Fields!ShipToAddress.Value
but the \n is not recognized
I have tried without the quote, with singles quotes, ... but no way...
It is a really stupid question and I haven't found an answer
Thanks for the one who answersYou could try this:
=Fields!ShipToName.Value & vbcrlf & Fields!ShipToAddress.Value
or
=Fields!ShipToName.Value & ControlChars.CrLf &
Fields!ShipToAddress.Value
I haven't verified how these will behave with different rendering.
This page has some info on the control characters:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vamscmiscellaneousconstants.asp
Good Luck,
Dan|||I always use Environment.NewLine which will work no matter what the viewer
is.
Craig
"Hasan Ozdil" <hasan.ozdil@.gmail.com> wrote in message
news:1141206171.555868.323910@.i40g2000cwc.googlegroups.com...
> In a report, I have a textbox... and I want to make a new line in the
> expression builder...
> I tried that
> =Fields!ShipToName.Value & "\n" & Fields!ShipToAddress.Value
> but the \n is not recognized
> I have tried without the quote, with singles quotes, ... but no way...
> It is a really stupid question and I haven't found an answer
> Thanks for the one who answers
>|||Environment.NewLine works perfectly !!
Thank you Craig|||Craig, that was a great tip! I have fields in a database that have line
feeds between lines and your tip with a function fixed it right up.
=Replace(Fields!fieldname.Value, vbLf, Environment.NewLine)
Worked like a champ, thanks a million.
Larry
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment