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!

How do you keep your field results from breaking mid phrase

Status
Not open for further replies.

axsom1

Technical User
Feb 27, 2001
67
US
Is there anyway to keep a line from breaking (similar to the html tag NOBR)?

Thanks

John
 
Do you mean the field contents are wrapping around instead of being displayed in one horizontal line? If so, extend the field width.

If this is not the case, please explain in more detail.

Thank you

Steve Chapman
 
What Im doing is putting the formula that Ido told me to use which is:
MyString := MyString + {table.med_cond} + " "

Im wondering if theres anyway to keep it from breaking, say if the med condition is Heart Disease, Heart then going to the next line and Disease. I do have the field width across the whole page, but I have a multi column form so I'm trying to get it as close as possible. I have multiple fields on my report that I can only span across half the page but they still want it to list across rather than down. I just was wondering if there is any possible way to keep it from breaking like the html tag NOBR. Appreciate any help!! Thanks

John
 
The is no good way of doing it. A solution that ignores the obvious issue that you are likely using a proportional font is to:
Assume you will have a line break after no more than 40 characters.
Search MyString for the last "," prior to the 40th character.
Record the position of that "," in a variable EndLine1.
Update a variable MyStringLine1 := MyString [1 to EndLine1]

Search MyString for the last "," prior to EndLine1 + 41
Record the position of that "," in a variable EndLine2.
Update a variable MyStringLine2 := MyString [EndLine1 + 1 to EndLine2]

etc.
As you can see, it is tedious and doesn't account for proportional spacing.
Malcolm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top