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

carriage returns in Crystal Reports?

Status
Not open for further replies.

mjmiller24

Programmer
Aug 29, 2001
17
US
Hello,

I am attempting to write some code where I need carriage returns.

I need something like


str := "7. Something here";
str2 := "See Attached";
field := {db.ID};

str + chr(13) + str2 + chr(13) + field


I have tried the above, but chr(13) just chops off the remainder of the text instead of creating a carriage return.

Can someone help me with this?
 
well first I assume that str,str2 and Field are defined as stringVar;

I always associate a line-feed with a CR

so your final formula would be

str + chr(13) + chr(10) + str2 + chr(13)+ chr(10) + field


Also make certain that {db.ID} is not NULL before you assign it to Field

eg. if not isnull({db.ID}) then
field := {db.ID}
else
field := " ";

otherwise if there is a Null then your formula will be killed for all not null examples as well

Hope this helps

Jim

 
Also check to make sure the field is formatted as Can Grow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top