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

Getting rid of the spaces and new line in notes field...

Status
Not open for further replies.

cdnamm

Programmer
Oct 25, 2002
41
US
Hello,
I have this note field in my report but it is taking too
much space in the report since it has too many spaces in between.
Sample notes

02.01.03 cs Adj. to cl#2002112506800028 was denied as ooa.
Per Penny ipa resp. on 2002 claims.
02.01.03 cs Erd date 01/15/03 from HP Amm recv'd date 01/24/03
02.01.03 cs Erd date 01/17/03 from HP Amm recv'd date 01/24/03

The report would display exactly like that with the spaces and new lines. I want to trim the space and make the new lines continuous so it will look like a nice paragraph and
save space. Thank you!
cdnamm

 
@DisplayFormula

******************
stringvar removespaces:= {table.stringfield}

while instr(removespaces," ") > 0 do
(removespaces:= replace(removespaces," ", " "));

removespaces
*********************

Removes the spaces, you could do a similar loop to remove the cr's

Lisa
 
Dear CDnamm,

You could also do a SQL Expression on the field and it wouldn't require any lools. Depending on your db the syntax is different but should be similar to:

Replace(Replace(Table.Notefield,' ',''), char(13),'')

Hope that helps,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks for your help, guys!
I really appreciate it!
cdnamm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top