Avatar of Robert Bowen
Robert Bowen
Flag for United States of America asked on

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.
Crystal Reports

Avatar of undefined
Last Comment
Robert Bowen

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Raghavendra Hullur

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

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

mlmcc
Raghavendra Hullur

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

ASKER
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.
Your help has saved me hundreds of hours of internet surfing.
fblack61