Crystal reports selection formula issue

I am having a hard time one last portion of a report I am writing, I haven't run into this scenario and would like to hear some input on this one. Also my first question on EE as I normally just read what others have been through.

So here's the situation, I have a field called {Arp} data within is like CM-2017 or M1-2017  etc.    I have another field call {ARC} it has data that is the first two digits. CM or M1  and I tried to use a parameter that has -2017 and combine that with the {ARC} to select records from {Arp}  
I don't even know if this is possible, I'm just not seeing a way to make this work.  

Any help greatly appreciated.
Robert BowenIT ManagerAsked:
Who is Participating?
Raghavendra HullurConnect With a Mentor Software DeveloperCommented:
Assuming you are looking to filter records using record selection, you can try something like below based on the information you have provided.
create a record selection content as (assuming your formula for year selection is year)  -->
{Command.ARP} = {Command.ARC}&{?year}

Hope this what you are looking for.
That is almost the solution.

YOu need to convert the year to a string of 4 digits with no decimal palces and no thousand separator

{Command.ARP} = {Command.ARC} & CSTr({?year}, 0,'')

Raghavendra HullurSoftware DeveloperCommented:
He said he is getting year in -2017 format, which is a string already, hence didn't use string conversion.
Robert BowenIT ManagerAuthor Commented:
Your correct, but this ends up including more than I wanted, but your formula is correct.  I think I have to go about this a little differently due to the other conditions.

way too much to try and explain here I think...but thanks for your answer.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.