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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grouping fields- first, middle and last name

Status
Not open for further replies.

ChrisCastle

Programmer
May 19, 2003
3
US
I just picked up CR8 a few days ago so I'm sure this question is obvious to most of you, but a response would be much appreciated.

I need to make a report that has information of individual clients. The Cover page just has the client’s first, middle and last name.

My problem is that in the layout, I setup a individual field for first, middle and last name (as according to my database). If the client has no middle name on record, it has a blank space that looks really bad.

I know there is a logical solution to group these names as one string or something, but I'm very new to this.

Thanks in Advance,
Christian
 
Name formula-trims and uses string proper format-

Trim(Left({PERSON.FIRST_NAME},1) + LowerCase(MID({PERSON.FIRST_NAME},2,15))) + ' ' +
Trim(Left({PERSON.LAST_NAME},1) + LowerCase(MID({PERSON.LAST_NAME},2,15)))
 
Create a New formula, by clicking on Insert/Formula Field.

In the Formula Editor, Concatenate the 3 fields into a single field.

eg, first_name + ' ' + Middle_name + ' ' + Last_name.

Use this new formula field in your layout.

 
Hi,

You are correct. Create a formula field with all the three fields combined and group by the new formula you created. If there is no middle name, create another formula with just middle name and last name. Using suppress option do not display this formula if middle name is null. If middle name is not null, suppress last name database. By using suppress option, you can achieve this.
 
Sujatha R - your formula will leave blanks if any of the name fields are not completely filled. TRIM should be used to eliminate the blanks.

Seminole - didn't you omit the MiddleInit from your formula?
 
Hi csm2,

I came across this phrase called "stacking" is used to accomplish what you wanted to do.
 

You can...

Insert a text object into your report,
drag your first name field into the text object,
insert a space character,
drag your middle name into the text object,
insert another space character,
drag you last name into the text object.

I believe CR will take care of the formatting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top