Hello,
How can I create a formula, to show my forename and surname field with First letter of forename and surname to be capital and the other letters to be lower case ?
Be aware that this will not cater for null values,
and may become incorrect for double barreled names
eg. Ann-Marie Street Porter --> Ann-marie Street porter
Ronald McDonald --> Ronald Mcdonald
There is another function available (its name escapes me) that is the same as the VB proper function, which capitalizes the first letter of every work in a string. Same downsides as FoxG mentioned with certain names. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
I know this question has been answered, but here is yet another way:
numbervar first := Length(trim({table.firstname}));
numbervar last := Length(trim({table.lastname}));
upper({table.firstname}[1])&{table.firstname}[2 to first]&
" "&Upper({table.lastname}[1])&{table.lastname}[2 to last]
This shows the use of the nifty substring operator.
Howard Hammerman,
Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.