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

Control break in field object contained in a textbox

Status
Not open for further replies.

vieja

Technical User
Apr 30, 2003
4
US
I have a report which contains a large text box. Within the paragraph in the textbox is a field name. The problem I'm having is the following:
When the report prints, it will often cut the field at the end of the line and continue it to the next line. So for example, if the data in the field is ABC Company, Inc., the output is AB at the end of line 1 and C Company, Inc. at the beginning of line 2. I would like to insure that the field remains together so if the field cannot fit on line 1 in its entirety, all of the field will be printed on line 2. Does anyone have any suggestions? I am using Crystal Reports v 9.

Thanks
 
I didn't think that Crystal would do what you describe here anyway. It doesn't do so here (CR 9) unless there's a space in the name, not in mid ABC.

Rather than use a text object, use a formula.

Let's say you're using:
"this is my company: " {table.field}

Create a formula such as:

if len(trim({table.field})) > 20 then
"this is my company: "+chr(13)+{table.field}
else
"this is my company: " {table.field}

Where 20 is the approximate amount of characters you have left on the line without counting the field.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top