水晶报表:有没有办法在regex的水晶报表? [英] crystal reports : is there a way to regex in crystal reports?
问题描述
我有一个水晶报表功能,它要求我剪除以 - 开头的字符,并删除 - (破折号)后的其余字符。
例如..我会有订单号00000112345-C43-PJ
从 - 到右边的所有内容,并得到结果00000112345
我寻找一个正则表达式和子字符串,但cr似乎没有这些功能可用。
提前感谢
Crystal可能没有正则表达式,但肯定有所有基本的字符串函数
Left( {OrderNumber},InStr({OrderNumber}, - ) - 1)
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 "-" and to the right and get the result 00000112345
I looked for a regex and substring but cr doesn't seem to have these functions available. thanks in advance
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)
这篇关于水晶报表:有没有办法在regex的水晶报表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!