Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Function to parse out field Post Reply Post New Topic
Author Message
ridershaun
Newbie
Newbie


Joined: 31 Aug 2010
Online Status: Offline
Posts: 32
Quote ridershaun Replybullet Topic: Function to parse out field
    Posted: 06 Jul 2018 at 3:49am
I currently use the MID function in a formula to parse out a field in a report to a usable value, but the problem now is we are running out of number combinations which has added an extra value sometimes in the field am parsing.

Today I take '0501741_HY44T90' and using mid ({LOC.NAME},2,1)& mid ({LOC.NAME},4,2)&"-"& mid({LOC.NAME},6,2)& mid ({LOC.NAME},9,2) and create '517-41HY'

I need to now take '09002410HY10010' and create '902-410HY'

I need the formula field to be able to do both since we now have a mix. Any insight that could be offered would be appreciated.

Thanks


Edited by ridershaun - 06 Jul 2018 at 3:50am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jul 2018 at 6:02am
so are you asking to take one action if the string has a _ and another actin if it does not?
Just adjust your existing code for the
if instr(field,'_')>0 then action 1 else
action 2
IP IP Logged
ridershaun
Newbie
Newbie


Joined: 31 Aug 2010
Online Status: Offline
Posts: 32
Quote ridershaun Replybullet Posted: 06 Jul 2018 at 10:04am
Thank you
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.