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 return

Status
Not open for further replies.

Machlink

Technical User
Apr 3, 2004
25
CA
I need to have carriage return in @combine_nn field which is 80 characters i need at 81 character. How to do this .

Thanks in advance
 
As with any technical post, please your software version information.

This formula will insert a carriage return after every 80th character:

whileprintingrecords;
StringVar MyField;
numbervar X;
For x := 1 to len({table.field}) do(
if remainder(len({table.field}),80) = 0 then
MyField:=MyField+mid(table.field},x,1)+chr(13)
else
MyField:=MyField+mid(table.field},x,1)
);
MyField

Just use this formula instead of the field.

Untested, but the theory is sound and it should be close.

-k
 
Try:

if len({@combine_nn}) > 80 then
left({@combine_nn},80)+chr(13)+mid({@combine_nn},81) else
{@combine_nn}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top