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

non-breaking space?

Status
Not open for further replies.

sneila

Programmer
Dec 5, 2005
6
NZ
Hi all

My client has requested that a 'non-breaking space' be placed between 2 words so that they always appear on the same line (eg '[13 offences]'). Is there a way to do this?

I've read that ascii char 160 is supposed to be a non-breaking space but this doesn't appear to work (by inserting at stored proc stage).

Thanks
Richard
 
Do not bring char 160 from DB. Instead, mark the space you need unbreakable with some standard ascii 1-127 character which is unlikely to appear in the text, for example one of these: * | \ < > ` ~ { } [ ] . Then define variable with the value chr(160) locally in the report formula and replace all occurrences of your unbreakable character with the variable.
 
Thanks again for your suggestion. I'll try that out.

Cheers

 
I tried the sugestion above and found that the result was the same - although it was worth a go. The outcme of this was that I had to test the length of the string in th estored proc and insert a char(10) maually using the mod() function, which became a little ugly but it worked.

Thanks for your help.
 
I tested the approach before suggesting and it worked fine.
Try, if you like, creating a formula column of the Char type with the following formula
Code:
function CF_1Formula return Char is
v varchar2(100):='One two three four five six';
begin
return v||chr(160)||v;  
end;
Now put the column on the report, and try to make the output breaking betweeen workds 'six' and 'One'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top