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!

Formula similar to Proper Case in Crystal 8.5

Status
Not open for further replies.

Benji247

Technical User
Apr 27, 2008
3
GB
In the database I write reports for, names and address string fields hold data in uppercase and I'm looking for a formula I could put in reports to change the format to Proper case (uppercase first letter and lowercase for rest of word(s)).I am limited to using Crystal 8.5 which does not have a Propercase function to use in formulas.

Can anyone help please?
 
The following should mostly work (without having seen your data):

stringvar x := {table.uppercasefield};
numbervar i;
numbervar j := len(x);
numbervar k;
stringvar y := "";
for i := 1 to j do(
if x in [" ", "."] then
k := 0 else
k := k + 1;
if i <> 1 and
k <> 1 then
y := y + lcase(x) else
y := y + x
);
y

I think there might also be a dll you can download, but I don't have any more information than that.

-LB
 
Hi,
Ken Hamady's answer in this thread will show you the UFL you need:

thread767-106314



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks for that.
Works a treat.

Crystal 8.5 User
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top