Link to home
Start Free TrialLog in
Avatar of John-S Pretorius
John-S PretoriusFlag for United States of America

asked on

Remove a preceding zero from report in crystal

I have a field in Crystal Reports 2011 with serial numbers : (No grouping is being done, only sorting accending - so they show up first)

123456789
987564321
023456789

I need to create a formula that checks each number and if it has a preceding zero, to remove it and just show the remaining numbers :
 023456789
    will be changed to
 23456789

Avatar of cain1k
cain1k

I took into account this maybe just for the first number and there wouldn't be 2 or 3 preceding zeros.

IF LEFT(field,1) = 0 THEN
    MID(field,2)
ELSE
    field
Avatar of John-S Pretorius

ASKER

Keep getting an error that a number is required here, it seems that the {serial} number field I'm applying this formula too is a string.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The second formula worked great.

Thank you.
Thank you, like always - that was perfect.