Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Text Interpretation 2

Status
Not open for further replies.

mtownbound

Technical User
Jan 28, 2002
293
0
0
US
I'm trying to add bold and a carriage return to a field. The bold works, but the chr(13) isn't.

If I disable the HTML Interpretation then the chr(13) works. What am I missing here?

"Of the " & "<b>"&totext({#RTotal1},0) &"</b>" & {@Was/Were}&
"<b>"&totext({#RTotal1},0)&"</b>" & Chr(13)&"Test"


Thanks!!
 
HTML cannot interpet CHR codes. Try "<br>" as a carriage return, and be sure to format the field to allow it to grow.

"Line <b> one </b> and <br> line 2
 
Thanks for the reply, but that didn't work.
 
It always pays to mention what version of Crystal Reports you are using.

The <br> notation works for version 2008 - I've used it several times without any problems. I'm not sure what works in other versions.
 
mtownbound,

Please show the formula where you plugged in the "<br>" as it should work.

-LB
 
mtownbound,

Original Post:
"Of the " & "<b>"&totext({#RTotal1},0) &"</b>" & {@Was/Were}&
"<b>"&totext({#RTotal1},0)&"</b>[red]" & Chr(13)&"[/red]Test"
Just an idea, but if you substituded the <br> directly into the above, you would receive an error (as the <br> would be outside the string definition).

The following *should* work, if not, please post your formula as per LBass's request, as it should be working.
Code:
"Of the " & "<b>"&totext({#RTotal1},0) &"</b>" & {@Was/Were}&
"<b>"&totext({#RTotal1},0)&"</b>[red]<br>[/red]Test"

Hope this helps!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Mike, that did it!! I think it was the quotes that were off. Thanks!!

"Of the " & "<b>"&totext({#RTotal1},0) &"</b>" & {@Was/Were}&
"<b>"&totext({#RTotal1},0)&"</b><br>Test
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top