Home > Archive > Visual Basic Crystal Reports > March 2006 > problems with vbNewLine
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 |
problems with vbNewLine
|
|
| Daniel Diez 2006-03-29, 7:06 pm |
| Hello everybody.
I'm trying to pass a rich text box to a formula field.
It's works porperly if the rich text box only has one line. but if the rich
text box has a Return inside, the Crystal Report Fails.
Thank ....
Dani from spain.
| |
| Luqman 2006-03-30, 4:04 am |
| Hi,
Replace all vbCarriageReturns and LineFeeds with Chr(13), before passing to
Crystal Report.
for example:
Say, your textbox has following lines.
My Line No. 1
My Line No. 2
My Line No. 3
Dim strText as String
strText=Replace(Text1.Text,chr(13)," ' +chr(10) + ' ")
strText=Replace(strText,Chr(10),"")
Now pass the strText to your formula.
Hope this helps.
Best Regards,
Luqman
"Daniel Diez" <daniel@balmaseda.biz> wrote in message
news:%23068mz3UGHA.1304@tk2msftngp13.phx.gbl...
> Hello everybody.
>
> I'm trying to pass a rich text box to a formula field.
>
> It's works porperly if the rich text box only has one line. but if the
> rich text box has a Return inside, the Crystal Report Fails.
>
> Thank ....
>
> Dani from spain.
>
| |
| Daniel Diez 2006-03-30, 7:06 pm |
| thanks a lot, i'll try.
Dani
"Luqman" <pearlsoft@cyber.net.pk> escribió en el mensaje
news:OSECUs9UGHA.224@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Replace all vbCarriageReturns and LineFeeds with Chr(13), before passing
> to Crystal Report.
>
> for example:
>
> Say, your textbox has following lines.
> My Line No. 1
> My Line No. 2
> My Line No. 3
>
> Dim strText as String
> strText=Replace(Text1.Text,chr(13)," ' +chr(10) + ' ")
> strText=Replace(strText,Chr(10),"")
>
> Now pass the strText to your formula.
>
> Hope this helps.
>
>
> Best Regards,
>
> Luqman
>
>
>
>
>
>
>
> "Daniel Diez" <daniel@balmaseda.biz> wrote in message
> news:%23068mz3UGHA.1304@tk2msftngp13.phx.gbl...
>
>
| |
| Daniel Diez 2006-03-30, 7:06 pm |
| Hi Luqman:
I've tried your code, but i cannot do it to work.
I've tried this:
strOk = "hello " & Chr(10) & Chr(13) & "bye"
CrystalReportDocument.DataDefinition.FormulaFields("Body").Text = "'" &
strOk & "'"
the error that appear is "the matching ' for this string is missing"
well, if everybody knows something about this mystery ...
sorry my bad english.
thanks everybody
Dani
"Luqman" <pearlsoft@cyber.net.pk> escribió en el mensaje
news:OSECUs9UGHA.224@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Replace all vbCarriageReturns and LineFeeds with Chr(13), before passing
> to Crystal Report.
>
> for example:
>
> Say, your textbox has following lines.
> My Line No. 1
> My Line No. 2
> My Line No. 3
>
> Dim strText as String
> strText=Replace(Text1.Text,chr(13)," ' +chr(10) + ' ")
> strText=Replace(strText,Chr(10),"")
>
> Now pass the strText to your formula.
>
> Hope this helps.
>
>
> Best Regards,
>
> Luqman
>
>
>
>
>
>
>
> "Daniel Diez" <daniel@balmaseda.biz> wrote in message
> news:%23068mz3UGHA.1304@tk2msftngp13.phx.gbl...
>
>
|
|
|
|
|