I'm new to Crystal Reports and I'm looking for a way to cut off a string if the string is too long and replace the end with ...
So I'm using Crystal Reports to generate Word or PDF Files. The Problem now is that I have a textfield that is too small for long strings.
The thing I want to do is check if the string is too long for the field. If it is, cut the string at the last , and replace the end with ....
How and where can I do that? How would the code look like?
I am using Crystal Reports 2011.
One way is to use the
Len-,Left-,Instr- andInstrrev-functions.The following formula should give you the expected result. (Only works with a monospaced font.)
In this example, the maximum length is 200 chars.
Just adjust the variable
MaxLento the number of chars you need.