Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How do you separate the dollars from cents Post Reply Post New Topic
Author Message
icheckout
Newbie
Newbie


Joined: 18 Apr 2010
Location: United States
Online Status: Offline
Posts: 15
Quote icheckout Replybullet Topic: How do you separate the dollars from cents
     Posted: 18 Apr 2010 at 4:39pm
Thank you for looking at my post.

I'm using Crystal 7 and I have two questions:

Question 1 - I need the formula that will allow me to print only the 3 in 3.95

So, if the field is 3.95
I only want to print the 3

Question 2 - I need the formula that will allow me to print only .95 in a field that is 3.95

So, if the field is 3.95
I only want to return the 95

For both questions there is always a period (.) that seperates the field. The field is actually a price field. So I am trying to seperate the dollars from the cents for a price that prints on a label.
 
When we print the price label the 3 will use a larger font than the 95. 
Thank you,
Richard Scott
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 19 Apr 2010 at 2:37am
Two formulas:
 
DOLLAR
truncate({table.doallrfield},0) then format the field so there are no decimal places.
 
CENTS
{table.dollarfield}-{Dollar} then format so there isn't a leading zero.
|< /\ '][' ( )
IP IP Logged
icheckout
Newbie
Newbie


Joined: 18 Apr 2010
Location: United States
Online Status: Offline
Posts: 15
Quote icheckout Replybullet Posted: 19 Apr 2010 at 2:52am
That got it! 
 
Thank you so much for sharing your solution.  It was a tremendous help.
 
-Richard Scott
IP IP Logged
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