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!

Simple Decminal Place Question

Status
Not open for further replies.

natetc

Technical User
Nov 4, 2010
21
CA
Hi all,

This is probably easy but I've spent 30 minutes in the Format Editor-Number-Customized menu and can't figure it out.

My output is without decimal places and I require two in the field. However, I want to place it within the existing data, I know I can just add them to the end but thats not what i want.

Current output:
10101

Desired output:
101.01

How do I do this? Does it require custom code?

Thanks!
 
Create a formula and divide by 100 and then set decimal places using format number.

Ian
 
If your value is 10101, you can get two decimal places by dividing by 100.

If you are displaying, you can control the display with something like ToText({your.field}, 2). Or combine them, e.g.
Code:
ToText(({your.field}/100), 2)

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Sorry, I'm still a newbie to Crystal.

When I input the formula:
ToText(({WRK.AAMT_001}/100), 2)

The system gives me the error
'A number, or currency amount is required here.'

The field is definitely numbers, so i'm not sure why this is happen.

 
Sorry, after trial and error I was able to implement your formula, thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top