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

Only showing a first word from a company name

Status
Not open for further replies.

suthin

Programmer
Jun 19, 2020
1
SG
Hi everyone, apologies in advance for asking a noob question as I'm still new to Crystals Reports.
But may I know if it's possible to shorten a long company name to show just the first word?
Eg.
"Sam Sung Private Limited" to show as just "Sam"
"Apple Iphone12 Plus Max" to show as just "Apple"
"Tesla Elon Musk" to show as just "Tesla"

I'm not sure of which formula to use to just get the first word out of this sentences.
Any help would be greatly appreciated
 
If split({table.company}," ")>0 then
Split({table.company}," ")[1] else
{table.company}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top