Link to home
Start Free TrialLog in
Avatar of George_Milton
George_MiltonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal Reports

Hi. I have very little knowledge of crystal reports but was hoping someone could help with this. What I need to do is to create a formula that will match part of a reference and then enter text or number.
So reference is abc/12/1234562, I want crystal to match /12/ and then insert 2012 into the report. I have tried a few things in formulas such as wild cards, and so far no luck. The other issue is that the characters before and after the /12/ can vary.

Thanks in advance
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Need more informatio on requirements.

Are you saying that your report should only contain records that have /12/ in this field?
Or are you saying that some records in the report will have this but others in the report will not have  /12/?

And are you saying you want the field to appear in the form..  abc/2012/1234562?

If this last bit is what you want then you just create a formula field that is...

replace({table.field}, "/12/", "/2012/")
Avatar of George_Milton

ASKER

Hi, sorry for the lack of info.
What I have is a report that is produced, one of the fields is Year. Now unfortunately the DB does not produce the correct information. So I was trying to create a formula that would look at the field called reference, would then look for /10/ within that field and then output into the report as 2010. I do the same with another fields, that just contains 3 letters, so I have an if statement that looks at the field and =abc then totext testabc, I just don’t know how to tell crystal to only check for the /10/ and if that matches then totext 2010, and so on for /11/, /12/ etc.. I hope that make sense

Thanks
SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi

I just want the year field to show 2012. Do not need any of the reference so, for example abc/10/123456 as /10/ is present the report will show 2010. Again apologies as I no real knowledge of Crystal
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi
Thanks that works, thank you very much, now if only I understood what it was doing!!!!

Again thanks very much