Link to home
Create AccountLog in
Avatar of Robert Bowen
Robert BowenFlag 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.
ASKER CERTIFIED SOLUTION
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Mike McCracken
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
He said he is getting year in -2017 format, which is a string already, hence didn't use string conversion.
Avatar of 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.