Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formatting Calculated Field Post Reply Post New Topic
Author Message
djustice
Newbie
Newbie
Avatar

Joined: 08 Feb 2012
Location: United States
Online Status: Offline
Posts: 17
Quote djustice Replybullet Topic: Formatting Calculated Field
     Posted: 21 Mar 2012 at 3:47am
I have a field that is Direct Hours/Total Hours, and they are just basic numbers e.g.,  Direct Hours  = 169.75 and Total Hours = 233.75 and I want this to be a percent.

So, the field should return 72.62%, but what I get is 0.73 and if the Direct and Total hours are the same I get 1.00, but should get 100%

How do I format it to give me a percent?  I know I can add the currency sign and change it to percent, but that still does not solve the problem of where the decimal place is. 

Thanks for any help.


DDavid Justice
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Mar 2012 at 3:52am
i am assuming you are creating a formula field using table.Direct Hours/table.Total Hours to get the percent.
to correct the .73 to 73 you can change this as
Direct Hours%Total Hours
or you can use
Direct Hours/Total Hours *100
to change the fomat to use xx%
right click on the field
select format field
select number tab
select customize button
select currency symbol tab
enable currency symbol set as true
change currency symbol to %
choose the fixed or floating optioon as you need it
choose the position so the % is on the right


Edited by DBlank - 21 Mar 2012 at 3:55am
IP IP Logged
djustice
Newbie
Newbie
Avatar

Joined: 08 Feb 2012
Location: United States
Online Status: Offline
Posts: 17
Quote djustice Replybullet Posted: 21 Mar 2012 at 4:12am
Great!  Using % instead of / worked great.  Thanks so much.
DDavid Justice
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