Ask a Question related to ASP Database, Design and Development.
-
John Berman #1
How can I add a CR LF
Hi
is it possibel to add a CR and LF after date in a string ie:
the quick CR LF bronw fox
so when a report is generated the CR and LF are put into action and the
viewer would see
the quick
bronw fox
Regards
John Berman
[email]john_berman@blueyonder.co.uk[/email]
John Berman Guest
-
Ray at #2
Re: How can I add a CR LF
TheString = "the quick" & vbCrLf & "bronw [sic] fox"
If you're writing HTML though, a vbCrLf will only put a crlf in the source,
which means nothing in HTML. Instead, you'd do:
TheString = "the quick <br> bronw [sic] fox"
Ray at work
"John Berman" <John_berman@blueyonder.co.uk> wrote in message
news:aEs1c.263$E%5.69@news-binary.blueyonder.co.uk...> Hi
>
> is it possibel to add a CR and LF after date in a string ie:
>
> the quick CR LF bronw fox
>
> so when a report is generated the CR and LF are put into action and the
> viewer would see
> the quick
> bronw fox
>
> Regards
>
> John Berman
> [email]john_berman@blueyonder.co.uk[/email]
>
>
Ray at Guest
-
John Berman #3
Re: How can I add a CR LF
sorry I was not to clear, the text is in a field within an acess database
and so when I wite out the field I want to see the CR and LF actioned
Regards
John B
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:edQgTxWAEHA.1036@TK2MSFTNGP10.phx.gbl...source,> TheString = "the quick" & vbCrLf & "bronw [sic] fox"
>
>
> If you're writing HTML though, a vbCrLf will only put a crlf in the> which means nothing in HTML. Instead, you'd do:
>
> TheString = "the quick <br> bronw [sic] fox"
>
> Ray at work
>
> "John Berman" <John_berman@blueyonder.co.uk> wrote in message
> news:aEs1c.263$E%5.69@news-binary.blueyonder.co.uk...>> > Hi
> >
> > is it possibel to add a CR and LF after date in a string ie:
> >
> > the quick CR LF bronw fox
> >
> > so when a report is generated the CR and LF are put into action and the
> > viewer would see
> > the quick
> > bronw fox
> >
> > Regards
> >
> > John Berman
> > [email]john_berman@blueyonder.co.uk[/email]
> >
> >
>
John Berman Guest
-
John Berman #4
Re: How can I add a CR LF
sorry I was not to clear, the text is in a field within an acess database
and so when I wite out the field I want to see the CR and LF actioned
Regards
John B
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:edQgTxWAEHA.1036@TK2MSFTNGP10.phx.gbl...source,> TheString = "the quick" & vbCrLf & "bronw [sic] fox"
>
>
> If you're writing HTML though, a vbCrLf will only put a crlf in the> which means nothing in HTML. Instead, you'd do:
>
> TheString = "the quick <br> bronw [sic] fox"
>
> Ray at work
>
> "John Berman" <John_berman@blueyonder.co.uk> wrote in message
> news:aEs1c.263$E%5.69@news-binary.blueyonder.co.uk...>> > Hi
> >
> > is it possibel to add a CR and LF after date in a string ie:
> >
> > the quick CR LF bronw fox
> >
> > so when a report is generated the CR and LF are put into action and the
> > viewer would see
> > the quick
> > bronw fox
> >
> > Regards
> >
> > John Berman
> > [email]john_berman@blueyonder.co.uk[/email]
> >
> >
>
John Berman Guest
-
Roland Hall #5
Re: How can I add a CR LF
"John Berman" wrote:
: sorry I was not to clear, the text is in a field within an acess database
: and so when I wite out the field I want to see the CR and LF actioned
John...
What is 'actioned'? If you want the carriage return/line feed to return the
left margin and increment the row to the next line, then what Ray showed you
does just that. You might have to adapt it to your application (field
values) but he gave you the information you needed.
If you want to write out a field value to the page and end it with a
carriage return/line feed then you can use:
If adj0 = quick and adj1 = dead...
<%
Response.Write("The " & rs("adj0") & "<br />" & vbCrLf & "and the " &
rs("adj1") & ".")
%>
The result will be:
The quick
and the dead.
Or you can use:
The quick <%= rs("adj0") %><br />
and the <%= rs("adj1") %>.
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - [url]http://www.microsoft.com/technet/scriptcenter/[/url]
WSH 5.6 Documentation - [url]http://msdn.microsoft.com/downloads/list/webdev.asp[/url]
MSDN Library - [url]http://msdn.microsoft.com/library/default.asp[/url]
Roland Hall Guest
-
Kindler Chase #6
Re: How can I add a CR LF
Roland Hall wrote:
I think he's looking to replace carraige returns from a text field with line> "John Berman" wrote:>>> sorry I was not to clear, the text is in a field within an acess
>> database and so when I wite out the field I want to see the CR and
>> LF actioned
> John...
>
> What is 'actioned'? If you want the carriage return/line feed to
> return the left margin and increment the row to the next line, then
> what Ray showed you does just that. You might have to adapt it to
> your application (field values) but he gave you the information you
> needed.
breaks:
<%
Private Function n3_LineBreak(str)
If InStr(str,chr(13)) Then
n3_LineBreak = Replace(str,chr(13),"<br />")
Else
n3_LineBreak = str
End If
End Function
%>
<%= n3_LineBreak(rs("YourField").value) %>
--
kindler chase
[url]http://www.ncubed.com[/url]
Home of SuperInvoice's Fortress of Solitude
[url]news://news.ncubed.com/support[/url]
n3 Support Group
Kindler Chase Guest
-
Jeff Cochran #7
Re: How can I add a CR LF
On Wed, 3 Mar 2004 19:14:42 -0700, "Kindler Chase"
<billyboy@DELETE_ME_roubaixinteractive.com> wrote:
Crap. I've been doing this for a long time and never stuck it in a>Roland Hall wrote:>>> "John Berman" wrote:>>>>> sorry I was not to clear, the text is in a field within an acess
>>> database and so when I wite out the field I want to see the CR and
>>> LF actioned
>> John...
>>
>> What is 'actioned'? If you want the carriage return/line feed to
>> return the left margin and increment the row to the next line, then
>> what Ray showed you does just that. You might have to adapt it to
>> your application (field values) but he gave you the information you
>> needed.
>I think he's looking to replace carraige returns from a text field with line
>breaks:
>
><%
>Private Function n3_LineBreak(str)
> If InStr(str,chr(13)) Then
> n3_LineBreak = Replace(str,chr(13),"<br />")
> Else
> n3_LineBreak = str
> End If
>End Function
>%>
>
><%= n3_LineBreak(rs("YourField").value) %>
clean function like this. Thanks for pointing out what a doofus I
sometimes am. :)
I've been doing Replace on each output line, which can get messy.
Jeff
Jeff Cochran Guest
-
Kindler Chase #8
Re: How can I add a CR LF
Jeff Cochran wrote:
<snip>lol - sure thing :)>>> <%
>> Private Function n3_LineBreak(str)
>> If InStr(str,chr(13)) Then
>> n3_LineBreak = Replace(str,chr(13),"<br />")
>> Else
>> n3_LineBreak = str
>> End If
>> End Function
>> %>
>>
>> <%= n3_LineBreak(rs("YourField").value) %>
> Crap. I've been doing this for a long time and never stuck it in a
> clean function like this. Thanks for pointing out what a doofus I
> sometimes am. :)
>
> I've been doing Replace on each output line, which can get messy.
>
> Jeff
--
kindler chase
[url]http://www.ncubed.com[/url]
Home of SuperInvoice: The Online Invoicing Application.
Organize your billing process and impress your clients.
[url]news://news.ncubed.com/support[/url]
n3 Support Group
Kindler Chase Guest



Reply With Quote

