Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Mustn't give up! Measure string in length... Post Reply Post New Topic
Author Message
tav1035
Newbie
Newbie


Joined: 29 Oct 2007
Location: United States
Online Status: Offline
Posts: 1
Quote tav1035 Replybullet Topic: Mustn't give up! Measure string in length...
    Posted: 01 Nov 2007 at 8:44pm
I have a description field on one of my reports. Sometimes users enter the description with CAPS and sometimes its lowercase, and mostly its both.
I have a formula that if the count of the characters are > than 40, then trim it at 37 and add ... (dot dot dot). This would allow me to better use the realestate and visualy let me know that there is some more text in that field. This works great if all records were CAPS or all were lowercase, but not when one record is CAPS and other are lowercase.
I would like all my descriptions to have the ... as close to the end of the report field as possible.
 
Ok, without using font that doesn't vary in length or without converting to lowercase, how can I accomplish this?
 
I found some code where people were attempting this already, but not sure if I can use this concept in crystal.
 
Or I could make some complex formula that would count the CAPS characters and make that formula shorter or look for wide characters like M,W, etc. but I would perfer not to.
 
Any ideas would help?
Thanks, Tommy
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Nov 2007 at 10:10pm
There is another post on this forum about this. I think they posted some sample code. But nonetheless, it's not perfect unless the fonts are fixed width. Search the forum for the other post.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.