Wednesday, March 21, 2012
Linefeed Issue
Why does chr(13) +chr(10) create a new line feed in Visual Studio, but does
not when you render using IE with the HTML viewer?
Any ideas'
JimWhich build are you running?
Did you try using the predefined VB constant VbCrLf ?
E.g. ="First line" & VbCrLf & "second line"
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> All,
> Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> does
> not when you render using IE with the HTML viewer?
> Any ideas'
> Jim
>|||Robert,
Thanks for the reply; Yes, I tried the Vb constant but I still get
inconsistent line feeds in IE. As a solution, I had to make each line the
same character length using a combination of left() and format().
Thanks,
Jim
"Robert Bruckner [MSFT]" wrote:
> Which build are you running?
> Did you try using the predefined VB constant VbCrLf ?
> E.g. ="First line" & VbCrLf & "second line"
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
> news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> > All,
> >
> > Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> > does
> > not when you render using IE with the HTML viewer?
> >
> > Any ideas'
> >
> > Jim
> >
>
>
Monday, March 19, 2012
line feeds
there any way i can include any sort of line feed or cr in the varchar
currently if i parm in 'line 1 line 2' i get
line 1 line 2
but what i want to get is
line 1
line 2Hi Peter,
You can use SQL Server's CHAR function to insert LF or CR (CHAR(10) or
CHAR(13)) into the text to display it correctly:
-- Set QA to "Results in text" (<ctrl> + T)
SELECT 'line1' + CHAR(10) + 'line2'
HTH
Ami
"Peter Newman" <PeterNewman@.discussions.microsoft.com> wrote in message
news:B63EB308-13E7-411F-BE68-6EF58CDD0816@.microsoft.com...
> Im parming a Nvarchar(4000) into a stored proc that uses xp_sendmail .
is
> there any way i can include any sort of line feed or cr in the varchar
> currently if i parm in 'line 1 line 2' i get
> line 1 line 2
> but what i want to get is
> line 1
> line 2|||To add to Ami's response, you can include both carriage return and line feed
as your line terminator. This is the Windows convention.
SELECT 'line1' + CHAR(13) + CHAR(10) + 'line2'
Hope this helps.
Dan Guzman
SQL Server MVP
"Ami Levin" <XXX_NOSPAM___XXX__amlevin@.mercury.com> wrote in message
news:%23y4VSqFCFHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi Peter,
> You can use SQL Server's CHAR function to insert LF or CR (CHAR(10) or
> CHAR(13)) into the text to display it correctly:
> -- Set QA to "Results in text" (<ctrl> + T)
> SELECT 'line1' + CHAR(10) + 'line2'
> HTH
> Ami
> "Peter Newman" <PeterNewman@.discussions.microsoft.com> wrote in message
> news:B63EB308-13E7-411F-BE68-6EF58CDD0816@.microsoft.com...
> is
>
Line feed problem in HTML
I use the equivalent of the old vbCrLf i.e. carriage return followed by a line feed, and this works fine in the HTML.
Try using Chr(13) & Chr(10) or the .NET property Environment.NewLine.
For formatting in SQL I use CHAR(13) + CHAR(10)
|||I'm sorry but I didn't get it. I have 3 rows long field in report(Fields!Address.value) and that value contains those carriage returns. So should I edit the expression of the field to find where the carriage returns are and replace them somehow?|||try Replace(Fields!Address.Value, chr(10), Environment.NewLine)Line Feed in Text Box on rdl file
text box, cant figure out how.
Line One"\n"Line Twotry appending a char(10) at the end of the string.
Ex:
print 'abcd'+char(10)+'efgh'
or
print 'abcd'+char(13)+'efgh'
"Adi" wrote:
> I am triyng to add a line feed char to my DB string which is assigned to a
> text box, cant figure out how.
> Line One"\n"Line Two|||Maybe use both. Most windows apps look for a Carriage Return and a Line
Feed together.
print 'abcd'+char(13)+char(10)+'efgh'
However, is this post even in the right forum? Are you trying to do this in
SQL Server, in VB.Net, Javascript?
"tthrone" <tthrone@.discussions.microsoft.com> wrote in message
news:D577C263-F691-4AE3-B7BD-6219F1F90B94@.microsoft.com...
> try appending a char(10) at the end of the string.
> Ex:
> print 'abcd'+char(10)+'efgh'
> or
> print 'abcd'+char(13)+'efgh'
> "Adi" wrote:
>
a
Line feed formating
I have put a chr(10) line feed in a expression and it displays just fine in the preview in VS. When I deploy it to the web server it ignores it.
How do I get the line feed to continue to the web server?
="Displays Job's that do not have serial numbers assigned to them form the pervious 30 days." & Chr(10) &
"Products for: " & Parameters!ProdClass.Label & ", Reporting dates: " & Format(DateAdd("d", -30, Now), "d") & " - " & Today
Try this instead:
="Displays Job's that do not have serial numbers assigned to them form the pervious 30 days." & VbCrLf &
"Products for: " & Parameters!ProdClass.Label & ", Reporting dates: " & Format(DateAdd("d", -30, Now), "d") & " - " & Today
-- Robert
|||That worked great Thanks!Line Feed and Carriage Return
like VBCrLF or chr(10). Thanks.I'd do something like this:
declare @.CRLF char(2)
set @.CRLF = char(10) + char(13)
--Jason
"Sean" <Sean@.discussions.microsoft.com> wrote in message
news:550D5201-EC23-4CC8-8A12-3818BED19890@.microsoft.com...
> Is there any Line Feed and Carriage Return in SQL script? It is something
> like VBCrLF or chr(10). Thanks.|||Char(13) = Carriage Return
Char(9) = tab.
select 'New line' + char(13) + 'after LF ' + Char(9) + ' after tab'
"Sean" wrote:
> Is there any Line Feed and Carriage Return in SQL script? It is something
> like VBCrLF or chr(10). Thanks.