Monday, March 19, 2012

How do I get the initals of a name in a report?

Hello all,
does anybody know the code to get the name initials for a field in a report?
e.g. username is 'John Miller' and i want only the initials 'JM'?
Thanks.Hey is your data going to be same meaning (firstname lastname) then can be
done using
= left(field!name, 1) + " " + mid(field!name, instr(" ", field!name) +1 ,1)
left will return the first letter and instring will search the space +1 so
the last name letter is pointed and length is 1 so it picks up the first
letter of the lastname.
Amarnath
"Joggel" wrote:
> Hello all,
> does anybody know the code to get the name initials for a field in a report?
> e.g. username is 'John Miller' and i want only the initials 'JM'?
>
> Thanks.
>

No comments:

Post a Comment