Crystal reports selection formula issue

Robert Bowen
Robert Bowen used Ask the Experts™
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.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

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,'')


He said he is getting year in -2017 format, which is a string already, hence didn't use string conversion.
Robert BowenIT Manager


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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial