Wednesday, March 7, 2012

Carriage Return and Line Feed in TexBox

I want to create a report with a textbox which contains a field followed by a
Carriage Return and Line Feed then another field
e.g
=First(Fields!Field1.Value)+ Carriage Return and Line Feed +
Fields!Field2.Value
How do I do this? I see a suggestion in places for vbCRLF and also \n. But
neither work.
Does vbCRLF apply perhaps to a vb.net environment? I'm in a c# environment.
Many Thanks
--
FionaDMDid you know you can insert another detail row? Just r-click on the row
selector, and insert row below.
Mike G.
"FionaDM" <FionaDM@.discussions.microsoft.com> wrote in message
news:2AD857E3-998C-494F-A9D1-558C430A1848@.microsoft.com...
>I want to create a report with a textbox which contains a field followed by
>a
> Carriage Return and Line Feed then another field
> e.g
> =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> Fields!Field2.Value
> How do I do this? I see a suggestion in places for vbCRLF and also \n. But
> neither work.
> Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
> environment.
> Many Thanks
> --
> FionaDM|||Try using the following:
=First(Fields!Field1.Value) & vbCrLf & Fields!Field2.Value
The Reporting Services expression designer uses VB6 style concatenation
characters so it might have been because you were using the + instead of
the &.
If it still doesn't work try using Environment.NewLine or "\n\r" in place
of vbCrLf but that should work for you. You can see a documented example of
using this in the following article:
http://msdn2.microsoft.com/en-us/library/ms157328.aspx
Just do a search for vbCrLf.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Thread-Topic: Carriage Return and Line Feed in TexBox
> From: =?Utf-8?B?RmlvbmFETQ==?= <FionaDM@.discussions.microsoft.com>
> Subject: Carriage Return and Line Feed in TexBox
> Date: Tue, 2 Oct 2007 06:25:01 -0700
> I want to create a report with a textbox which contains a field followed
by a
> Carriage Return and Line Feed then another field
> e.g
> =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> Fields!Field2.Value
> How do I do this? I see a suggestion in places for vbCRLF and also \n.
But
> neither work.
> Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
environment.
> Many Thanks
> --
> FionaDM
>|||Thanks - & vbCrLf & did the trick
--
FionaDM
"Chris Alton [MSFT]" wrote:
> Try using the following:
> =First(Fields!Field1.Value) & vbCrLf & Fields!Field2.Value
> The Reporting Services expression designer uses VB6 style concatenation
> characters so it might have been because you were using the + instead of
> the &.
> If it still doesn't work try using Environment.NewLine or "\n\r" in place
> of vbCrLf but that should work for you. You can see a documented example of
> using this in the following article:
> http://msdn2.microsoft.com/en-us/library/ms157328.aspx
> Just do a search for vbCrLf.
> --
> Chris Alton, Microsoft Corp.
> SQL Server Developer Support Engineer
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --
> > Thread-Topic: Carriage Return and Line Feed in TexBox
> > From: =?Utf-8?B?RmlvbmFETQ==?= <FionaDM@.discussions.microsoft.com>
> > Subject: Carriage Return and Line Feed in TexBox
> > Date: Tue, 2 Oct 2007 06:25:01 -0700
> >
> > I want to create a report with a textbox which contains a field followed
> by a
> > Carriage Return and Line Feed then another field
> >
> > e.g
> > =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> > Fields!Field2.Value
> >
> > How do I do this? I see a suggestion in places for vbCRLF and also \n.
> But
> > neither work.
> > Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
> environment.
> >
> > Many Thanks
> >
> > --
> > FionaDM
> >
>|||Great. Those concatenation things always got me between VB and C# so you
aren't the only one.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Thread-Topic: Carriage Return and Line Feed in TexBox
> From: <FionaDM@.discussions.microsoft.com>
> Subject: RE: Carriage Return and Line Feed in TexBox
> Date: Wed, 3 Oct 2007 02:56:01 -0700
> Thanks - & vbCrLf & did the trick
> --
> FionaDM
>
> "Chris Alton [MSFT]" wrote:
> > Try using the following:
> > =First(Fields!Field1.Value) & vbCrLf & Fields!Field2.Value
> >
> > The Reporting Services expression designer uses VB6 style concatenation
> > characters so it might have been because you were using the + instead
of
> > the &.
> >
> > If it still doesn't work try using Environment.NewLine or "\n\r" in
place
> > of vbCrLf but that should work for you. You can see a documented
example of
> > using this in the following article:
> >
> > http://msdn2.microsoft.com/en-us/library/ms157328.aspx
> >
> > Just do a search for vbCrLf.
> >
> > --
> > Chris Alton, Microsoft Corp.
> > SQL Server Developer Support Engineer
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > --
> > > Thread-Topic: Carriage Return and Line Feed in TexBox
> > > From: =?Utf-8?B?RmlvbmFETQ==?= <FionaDM@.discussions.microsoft.com>
> > > Subject: Carriage Return and Line Feed in TexBox
> > > Date: Tue, 2 Oct 2007 06:25:01 -0700
> > >
> > > I want to create a report with a textbox which contains a field
followed
> > by a
> > > Carriage Return and Line Feed then another field
> > >
> > > e.g
> > > =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> > > Fields!Field2.Value
> > >
> > > How do I do this? I see a suggestion in places for vbCRLF and also
\n.
> > But
> > > neither work.
> > > Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
> > environment.
> > >
> > > Many Thanks
> > >
> > > --
> > > FionaDM
> > >
> >
> >
>|||I have also seen controlchars.newline referenced and have personally used
System.Environment.NewLine. Is there one that is most efficient?
"Chris Alton [MSFT]" wrote:
> Great. Those concatenation things always got me between VB and C# so you
> aren't the only one.
> --
> Chris Alton, Microsoft Corp.
> SQL Server Developer Support Engineer
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --
> > Thread-Topic: Carriage Return and Line Feed in TexBox
> > From: <FionaDM@.discussions.microsoft.com>
> > Subject: RE: Carriage Return and Line Feed in TexBox
> > Date: Wed, 3 Oct 2007 02:56:01 -0700
> >
> > Thanks - & vbCrLf & did the trick
> > --
> > FionaDM
> >
> >
> > "Chris Alton [MSFT]" wrote:
> >
> > > Try using the following:
> > > =First(Fields!Field1.Value) & vbCrLf & Fields!Field2.Value
> > >
> > > The Reporting Services expression designer uses VB6 style concatenation
> > > characters so it might have been because you were using the + instead
> of
> > > the &.
> > >
> > > If it still doesn't work try using Environment.NewLine or "\n\r" in
> place
> > > of vbCrLf but that should work for you. You can see a documented
> example of
> > > using this in the following article:
> > >
> > > http://msdn2.microsoft.com/en-us/library/ms157328.aspx
> > >
> > > Just do a search for vbCrLf.
> > >
> > > --
> > > Chris Alton, Microsoft Corp.
> > > SQL Server Developer Support Engineer
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > > --
> > > > Thread-Topic: Carriage Return and Line Feed in TexBox
> > > > From: =?Utf-8?B?RmlvbmFETQ==?= <FionaDM@.discussions.microsoft.com>
> > > > Subject: Carriage Return and Line Feed in TexBox
> > > > Date: Tue, 2 Oct 2007 06:25:01 -0700
> > > >
> > > > I want to create a report with a textbox which contains a field
> followed
> > > by a
> > > > Carriage Return and Line Feed then another field
> > > >
> > > > e.g
> > > > =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> > > > Fields!Field2.Value
> > > >
> > > > How do I do this? I see a suggestion in places for vbCRLF and also
> \n.
> > > But
> > > > neither work.
> > > > Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
> > > environment.
> > > >
> > > > Many Thanks
> > > >
> > > > --
> > > > FionaDM
> > > >
> > >
> > >
> >
>|||I personally haven't tried using either of those in a report but since it
supports .NET namespaces I don't see why it wouldn't.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Thread-Topic: Carriage Return and Line Feed in TexBox
> thread-index: AcgHaTZxHlx+/uxhRJCGUmWO9AQkmQ==> X-WBNR-Posting-Host: 207.46.19.197
> From: =?Utf-8?B?V2lsbGlhbQ==?= <William@.discussions.microsoft.com>
> References: <2AD857E3-998C-494F-A9D1-558C430A1848@.microsoft.com>
<pGoU9QQBIHA.240@.TK2MSFTNGHUB02.phx.gbl>
<EF5C20BB-CFAB-4622-96D2-2F45B21444AC@.microsoft.com>
<e6Gm4coBIHA.240@.TK2MSFTNGHUB02.phx.gbl>
> Subject: RE: Carriage Return and Line Feed in TexBox
> Date: Fri, 5 Oct 2007 09:03:04 -0700
> I have also seen controlchars.newline referenced and have personally used
> System.Environment.NewLine. Is there one that is most efficient?
> "Chris Alton [MSFT]" wrote:
> > Great. Those concatenation things always got me between VB and C# so
you
> > aren't the only one.
> >
> > --
> > Chris Alton, Microsoft Corp.
> > SQL Server Developer Support Engineer
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > --
> > > Thread-Topic: Carriage Return and Line Feed in TexBox
> > > From: <FionaDM@.discussions.microsoft.com>
> > > Subject: RE: Carriage Return and Line Feed in TexBox
> > > Date: Wed, 3 Oct 2007 02:56:01 -0700
> > >
> > > Thanks - & vbCrLf & did the trick
> > > --
> > > FionaDM
> > >
> > >
> > > "Chris Alton [MSFT]" wrote:
> > >
> > > > Try using the following:
> > > > =First(Fields!Field1.Value) & vbCrLf & Fields!Field2.Value
> > > >
> > > > The Reporting Services expression designer uses VB6 style
concatenation
> > > > characters so it might have been because you were using the +
instead
> > of
> > > > the &.
> > > >
> > > > If it still doesn't work try using Environment.NewLine or "\n\r" in
> > place
> > > > of vbCrLf but that should work for you. You can see a documented
> > example of
> > > > using this in the following article:
> > > >
> > > > http://msdn2.microsoft.com/en-us/library/ms157328.aspx
> > > >
> > > > Just do a search for vbCrLf.
> > > >
> > > > --
> > > > Chris Alton, Microsoft Corp.
> > > > SQL Server Developer Support Engineer
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > > --
> > > > > Thread-Topic: Carriage Return and Line Feed in TexBox
> > > > > From: =?Utf-8?B?RmlvbmFETQ==?= <FionaDM@.discussions.microsoft.com>
> > > > > Subject: Carriage Return and Line Feed in TexBox
> > > > > Date: Tue, 2 Oct 2007 06:25:01 -0700
> > > > >
> > > > > I want to create a report with a textbox which contains a field
> > followed
> > > > by a
> > > > > Carriage Return and Line Feed then another field
> > > > >
> > > > > e.g
> > > > > =First(Fields!Field1.Value)+ Carriage Return and Line Feed +
> > > > > Fields!Field2.Value
> > > > >
> > > > > How do I do this? I see a suggestion in places for vbCRLF and
also
> > \n.
> > > > But
> > > > > neither work.
> > > > > Does vbCRLF apply perhaps to a vb.net environment? I'm in a c#
> > > > environment.
> > > > >
> > > > > Many Thanks
> > > > >
> > > > > --
> > > > > FionaDM
> > > > >
> > > >
> > > >
> > >
> >
> >
>

No comments:

Post a Comment