Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a number 1

Status
Not open for further replies.

terenceb

Programmer
Jun 10, 2003
77
US
Hi All,

I am writing in Crystal 8.5 using a SQL tables from a Cashe database. I am attempting to format a number( percentage). The number looks like. (0.2346) and I want it to look like 23.5%. I have tried farmatting by right clicking on the field choosing format and then customize. I have tried several variations using the Decimals and Rounding. Can someone help.
 
A percentage formula works as follows:

(12/100)*100

If you alerady have the percentage as a decimal, just multiply it by 100 in a formula.

Now you can use the custom number formatting to apply the rounding of interest, and also specify a currency symbol of %.

-k
 
Hi,
multiply it by 100..
0.2346 * 100 (= 23.46)
then do a totext and concatenate a % sign - Like this

@Pctfromdecimal
Code:
totext({table.number}*100,'9999.99') + ' %'


Should do it..

[profile]
 
You might have to replace the number with a formula:

{table.number}*100

Then use the % icon on the toolbar to format with the percentage sign.

If the number is actually a calculated field, as in:

{table.field1}/{table.field2}

You can replace the "/" with a "%" as in:

{table.field1}%{table.field2}

...and then use the icon to add the % sign.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top