Re: split a string! by aNOpengellySPAM
aNOpengellySPAM
Mon Feb 06 16:22:14 CST 2006
Hi Rob,
Is this for use in a report? Sorry if I waste your
time up wrong tree.
In reports, I now use a single line text box with
something like:
ocontact.salute, ocontact.firstname,
ocontact.surname; ocontact.add1; ocontact.add2;
ocontact.add3; ocontact.city,
ocontact.postcode;oContact.emailname
all on one line as the field expression and
stretch with overflow checked.
Comes out as
Mr Joe Bloggs
14 Anywhere St
Somewhere
Else SK10 5GH
jbloggs@some_isp.com
The "," will add a space or remove that part and
the semi-colon creates a new line only if there is
anything there
FoxPro seamlessly removes blank spaces and lines -
I got it from Cathy Pountneys book. She says Fox
has been able to do this for years, but it was a
revelation to me (and covered the cost of the book
many times). I use it all the time now for
addresses.
You could maybe use chrtran() to change commas to
semi-colons ...
CHRTRAN("The string, to be searched, goes
here",",",";") ...
regards
Alan