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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decimal places rounding down 1

Status
Not open for further replies.

dhurrell

MIS
Mar 20, 2002
4
US
I've formatted the field properties and opted to have two decimal places but now all my numbers are automatically rounded down.

eg. 458.56 reads 458.00
4.01 reads 4.00

So I'm not missing the decimal places, rather I'm missing the correct value after the decimal place.

Any help would be much appreciated
Thanks
Diarmid
 
right click the field(s) in question and select format. Make sure that both decimls and rounding have 2 places after the decimal. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
If that doesn't help, tell us what version you are using and where specifically you are setting this option. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks for the suggestions but I'm still stuck. I've done as dgillz suggested but to no avail.
I'm using Crystal reports Version 8 (and am completely new to it).
Below I've described what I see in the "Personalized style" options of "formatting editor". This is what I see in the "Numbers" tab. Note that I'm using a french version of Crystal reports so I've translated as best I can but some field descriptions may not be entirely accurate:

Use Compatability format: NOT TICKED
Delete if zero: NOT TICKED
Decimal seperator: ,
Decimals: 1,00
Seperate Thousandths: TICKED
Rounding: 0,01
Symbol: BLANK
Negatives: -123
Zero above (header?): TICKED
Invert the sign for display: NOT TICKED
Allow cutting of fields: TICKED
Show nul values as: Default Format
Example: -55 555,56

My Windows default number settings in "regional settings" of control panel specify 2 decimal places.

Before I created the report I set how I wanted numbers to display throughout the report in 'options'/'report options'.

Still when I have a value like 456,56 I get 456,00 and 4.01 I get 4,00 when I would like to see the numbers displayed accurately to two decimal places.

Do you have any suggestions regarding where else I might look to modify the format of the numbers, or is there something wrong with my current format.

Thanks for your help
Diarmid
 
This may be a bug in the French version. Try adding these two formulas to see if it is the database connection or the formatting:

Form1:
{field} * 100

Form2:

Round( {Field} , 2)

What is the result for 456,56 when you place these onto the detail band. If the first says 45.600,00 the problem is your database connection rounding before it gets to the report. If the the first is 45.656 then tell us what formula 2 did. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I tried the first formula and got the result 45.600,00 so I spoke to my database administrator and it transpires that there was a faulty database connection pilote (driver?)
This has since been updated or changed and I now see exactly what I want to see.

Thanks a lot, Ken and dgillz, for your help, it's been extremely useful and saved me tons of time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top