I have a crystal report function which requires me to trim off characters which start with a "-" and delete the rest following the the "-" (dash).
For example, I would have order number 00000112345-C43-PJ.
How would I just trim off everything from the right of the "-" get the result as 00000112345?
I looked for a regex and substring but crystal doesn't seem to have these functions available.
Crystal might not have regex but it certainly has all the basic string functions
Something like this should do it for you (not tested):
I've recently added a regex library here:- https://sourceforge.net/projects/cruflregex/files/
It's a bit minimal, but might be of use to someone.
I just posted this over on the SAP Community Network.
http://scn.sap.com/community/crystal-reports/blog/2013/01/31/regular-expressions-within-a-crystal-report
This certainly won't work for everyone, but it is an option.
Noel
This hasn't been a feature in Crystal reports for a while. I heard it might be a feature in the latest crystal reports (16?). Check out their website and give them a call, they shouldn't charge for a pre-sales question.
Another approach you could take to this is to manually process the value and validate it using the string and isvalue functions, etc. Messier, but it might be a backup option.