angeleam
asked on
How do I limit the number of characters returned in a variable.
I am receiving the following error with this formula in Crystal XI.
A string can be at most 65534 characters long.
How do I limit the number of characters returned?
A string can be at most 65534 characters long.
How do I limit the number of characters returned?
Here is the formula that the report is bombing out on.
whileprintingrecords;
stringvar x:=x+{Database.NOTES}
Type = String and Length is 1000
ASKER
I don't need to print if it is over 64. when I use this formula I receive an error: The ) is missing. and it highlights (x)
Did you add that to your formula as shown below.
whileprintingrecords;
stringvar x;
If Len(x) < 64533 then
x := x + {Database.NOTES}
mlmcc
whileprintingrecords;
stringvar x;
If Len(x) < 64533 then
x := x + {Database.NOTES}
mlmcc
ASKER
I left out the ;. I think this formula will work for me. Thank you for your reply.
ASKER
After validating my data how would display the text if it is over 65534?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You
You can do this
If Len(x) < 64533 then
x := x + {Database.NOTES}
If you need to display the full string there are ways using arrays of strings.
mlmcc