For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > August 2005 > Crystal Text Object CRLF???









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Crystal Text Object CRLF???
ufgator1978@yahoo.com

2005-08-17, 5:06 pm

Hi everyone,

I'm having a problem doing what should be a simple thing, but maybe I'm
missing something! I have a Crystal report with a text object on it.
In a VB.NET program, I am trying to populate the text object with the
following:

"This is line 1.
This is line 2.
This is line 3."

For some reason, I am unable to get the CRLF to work and all of the
text winds up on one line: "This is line 1.This is line 2.This is line
3." Here is the code I am using:

dim txt As CrystalDecisions.CrystalReports.Engine.TextObject
txt = rpt.ReportDefinition.ReportObjects.Item("txtObject1")
txt.Text = txtFooter.Text = "This is line 1." & Chr(13) & "This is line
2." & Chr(13) & "This is line 3"

I also tried using vbCRLF instead of Chr(13) and that did not work.
Does anyone have any idea as to what may be wrong??? Thank you very
much!!!

Richard Dudley

2005-08-18, 6:01 pm

If your output format is HTML, try using "<br />" instead of chr(13).

<ufgator1978@yahoo.com> wrote in message
news:1124311383.631129.70610@f14g2000cwb.googlegroups.com...
> Hi everyone,
>
> I'm having a problem doing what should be a simple thing, but maybe I'm
> missing something! I have a Crystal report with a text object on it.
> In a VB.NET program, I am trying to populate the text object with the
> following:
>
> "This is line 1.
> This is line 2.
> This is line 3."
>
> For some reason, I am unable to get the CRLF to work and all of the
> text winds up on one line: "This is line 1.This is line 2.This is line
> 3." Here is the code I am using:
>
> dim txt As CrystalDecisions.CrystalReports.Engine.TextObject
> txt = rpt.ReportDefinition.ReportObjects.Item("txtObject1")
> txt.Text = txtFooter.Text = "This is line 1." & Chr(13) & "This is line
> 2." & Chr(13) & "This is line 3"
>
> I also tried using vbCRLF instead of Chr(13) and that did not work.
> Does anyone have any idea as to what may be wrong??? Thank you very
> much!!!
>



ufgator1978@yahoo.com

2005-08-18, 6:01 pm

Hi, thanks for your response but my I want my output format to be
regular text. I look forward to hearing from everyone on this issue...

Thanks!

Brian Bischof

2005-08-18, 6:01 pm

Here's a KB article on it...

http://support.businessobjects.com/...es/c2015089.asp


HTH,

Brian Bischof
www.CrystalReportsBook.com



<ufgator1978@yahoo.com> wrote in message
news:1124376313.414264.265090@z14g2000cwz.googlegroups.com...
> Hi, thanks for your response but my I want my output format to be
> regular text. I look forward to hearing from everyone on this issue...
>
> Thanks!
>



ufgator1978@yahoo.com

2005-08-19, 4:22 pm

Thank you very much for your reply Brian. btw, your book has been very
helpful to me when working with Crystal in my applications!!!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com