Crystal reports: is there a way to regex in crystal reports?

前端 未结 4 1699
傲寒
傲寒 2020-12-18 06:14

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,

相关标签:
4条回答
  • 2020-12-18 06:36

    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.

    0 讨论(0)
  • 2020-12-18 06:44

    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

    0 讨论(0)
  • 2020-12-18 06:53

    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.

    0 讨论(0)
  • 2020-12-18 06:59

    Crystal might not have regex but it certainly has all the basic string functions

    Something like this should do it for you (not tested):

    Left({OrderNumber}, InStr({OrderNumber}, "-") - 1) 
    
    0 讨论(0)
提交回复
热议问题