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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Syntax Newline Command

Status
Not open for further replies.

Odysseus2118

Programmer
Jun 5, 2002
3
US
Hello,

I was wondering if anyone knew of a newline command in crystal syntax. For example, if I wanted to create a formula which puts together an address: I would want to get the street address, then add a new line (so the next line would be below the street address), then the city, then a newline, then the state/zip.
Is there anyway to do this? Thank you for any help ahead of time.

 
Try this:
{line 1} + chr(13)+{line 2}+chr(13)+{line 3}


Make sure you format the field to "Can Grow"
Mike

 
Thank you, it seemed to work fine. Out of curiousity, what does the chr(13) command stand for?

Now that this has worked I have another question. What, if anything, can be done if the value in the database is NULL? For example, say no address is specified, but a town/city is. Is there anyway to display the town name without creating a blank line where the address would usually go? Thanks again.
 
If IsNull({Field2}) then
{Field1}+chr(13)+{Field3} else
<< your full formula >> Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
CHR(13) is ASCII for &quot;carriage return&quot; Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top