About
Pricing
Community
Teams
Start Free Trial
Log in
jspc
asked on
9/15/2016
Crystal Reports - Trim Data
Hello,
I’m wanting to trim a field.
I have a product code like the following:
100003.BLK.SML
104+YEL+LRG
1005-GRE-XLG
I need to trim the code so it appears like below taking into account the following characters . + / * -
100003
104
1005
The code length can’t exceed 16 characters.
Thank you
Crystal Reports
7
1
Last Comment
jspc
8/22/2022 - Mon
Ryan Chong
9/15/2016
what's your backend database? are you able to manipulate the data from backend source instead?
jspc
9/15/2016
ASKER
SQL Database
Mike McCracken
9/15/2016
DO you just need the leading numeric part?
If so use
Val({YourField})
Select all
Open in new window
If you want it as a string use
CStr(Val({YourField}),0)
Select all
Open in new window
mlmcc
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
jspc
9/15/2016
ASKER
yes just front front part as per my example
ASKER CERTIFIED SOLUTION
Mike McCracken
9/15/2016
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike McCracken
9/15/2016
My String formula will result in a comma
use
1:CStr(Val({YourField}),0,'')
Select all
Open in new window
jspc
9/15/2016
ASKER
Bingo! Thanks
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.