Solved

simple formula to make first letter of a name in caps

Posted on 2004-09-22
7
402 Views
Last Modified: 2010-05-18

how can i create a function where a name like  JHONES or  jHOnes     can become Jhones   so the first letter is in caps only.
0
Comment
Question by:gianitoo
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 28

Expert Comment

by:bdreed35
ID: 12127182
What version of Crystal are you using?

In version 9 or 10, there is a function called ProperCase that will do it for you.

ProperCase({table.name})

If you have a version prior to 9, then try this:

Uppercase({table.name}[1]) & lowercase(mid({table.field},2))
0
 
LVL 1

Author Comment

by:gianitoo
ID: 12127198
i use 10
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 12127212
CR9 + uses the Propercase function.  if you have 8.5 or lower, you could create a formula similar to:

Uppercase(Left({table.field},1)) + Lowercase(Mid({table.field},2,Length(TrimRight({table.field}))))

~Kurt
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 12127268
bdreed35's formula is much more concise - i'm too old school:-).  If you're on 10, then you should use Propercase :-)
0
 
LVL 10

Expert Comment

by:anv
ID: 12130604
hi rhinok

Question is where will the user add the formula in design mode..??
which property will reflect the changes, as per the above formula??
0
 
LVL 28

Accepted Solution

by:
bdreed35 earned 500 total points
ID: 12132215
You don't use the logic above in one of the properties of that name field, you create a new formula and use the logic there.

If you need step by step instructions on how to create this then here you go:

Open the Field Explorer, if it is not open already.  Chance are it is open already in 10 but if nit, go to View menu, Field Explorer.
Right click "Formulas", and select new.
Give it a name, possibly Name, and click the use Editor button.
In the editor, enter the logic we gave you:

ProperCase({table.name})

You will need to swap {table.name} with the field that has your date in it.
Click Save and Close.
Lastly, drag the new Formula from the Field Explorer to your report canvas.  Place it where you want it displayed.

0
 
LVL 10

Expert Comment

by:anv
ID: 12140072
hi bdreed35

thanx  for the comment above..
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question