Crystal Reports – using Propercase but with some words needed in lower case – for example Wired for Sound

In Crystal Reports, if the data coming into a report is a mess of upper, lower and proper case, you may well want to convert the field using the function PROPERCASE. However, on doing so, you may find there are one or two that still look strange – for example ‘Bikes And Trikes’ may look better as ‘Bikes and Trikes’, etc. Decide which words you want to still be in lower case, for example, ‘to’, ‘and’, ‘for’ and ‘the’.

Proper case

In the example above, I have created a formula which converted my original customer name to proper case. I then use cstr to convert the resulting formula to a string.

To take into account that there may be a string where and is part of a word for example Bikes of England, when looking for a particular word in the string I have included spaces on either side of the word.

In the screenshot below, the Proper case column is to the left and the column to the right shows the result using the formula above.

Find out more about our Crystal Reports training in the London area or our Crystal Reports training in the Wiltshire, Dorset and Hampshire areas.


About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 (or 150 Aussie dollars)for every time someone says "If only I'd known that." ....
This entry was posted in Crystal Reports and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s