George_Milton
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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi
Thanks that works, thank you very much, now if only I understood what it was doing!!!!
Again thanks very much
Thanks that works, thank you very much, now if only I understood what it was doing!!!!
Again thanks very much
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/")