Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Trimming of number fields.. is that possible? Post Reply Post New Topic
Author Message
Yume
Newbie
Newbie
Avatar

Joined: 29 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Yume Replybullet Topic: Trimming of number fields.. is that possible?
    Posted: 29 Nov 2007 at 4:59am
Hello.. my first ever post
 
I know CR allows you to trim string fields or either use the right/left function, however is there a similar function for number fields. I have a number field that always produce a space before the first digit and this is me being vain, I want to align the field with other fields for my form. Is there a way to omit that space or is that how Access is setted up?
 
Only been using CR for 3months and theres many more functions I have still yet to discover.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Nov 2007 at 12:15pm
I'm not familiar with the space being added at the front. Are you formatting it with a string function? Are you doing a left-justify on the field? Or are you simply dragging and dropping the numeric field onto the form? Not sure where the problem is being derived from.
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
Yume
Newbie
Newbie
Avatar

Joined: 29 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Yume Replybullet Posted: 01 Dec 2007 at 4:23am
When I drop the number field into the form and left align, there seem to be a space in front of the digits when view in design mode. Its a form designed for sales invoice, not a big problem but wanted it to align it with the other fields below it. Just wondering if ou can trim a number field from the front.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 02 Dec 2007 at 12:34pm
Unfortunately, I can't mimic this behavior on my computer. However, if you want to experiment with it, here are some functions you can use.

CStr({field},"#") - convert a number to a string.
Trim({string field}) - trims the spaces from both sides of a string.

If you check out my CR Encyclopedia book, Chapter 6 lists all the built-in CR functions and gives examples of how to use them.
CR Encyclopedia
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.000 seconds.