Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: large digits displayed incorrectly Post Reply Post New Topic
Author Message
ricky969
Groupie
Groupie
Avatar

Joined: 03 Jul 2008
Location: United States
Online Status: Offline
Posts: 53
Quote ricky969 Replybullet Topic: large digits displayed incorrectly
     Posted: 17 Jul 2009 at 2:53pm
SQL table reads 12345678998765432 - CR displays 12345678998765400
SQL table reads 1234567891234567 -   CR displays 1234567891234570
 
field is a number, decimals 1, rounding 1, negative"none", currency symbol: unchecked, thousands separator: unchecked.
 
tested with cr9.5 and cr2008
 
I cannot figure out what's happening. can anyone help.
 
thanks
 
Rick


Edited by ricky969 - 17 Jul 2009 at 3:32pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 20 Jul 2009 at 6:27am
My guess is that Crystal is limited to displaying 15 digits with accuracy, since rounding isn't being employed, and decimals don't matter, and the 'least significant' digit is being rounded.  It could also be how database is sending the number, perhaps it is in scientific notation.
 
I haven't come across this, but my reports don't have amounts that get that high...usually only into the billons 10^9 (6 digits smaller than the example)
 
Maybe someone else knows.
IP IP Logged
ricky969
Groupie
Groupie
Avatar

Joined: 03 Jul 2008
Location: United States
Online Status: Offline
Posts: 53
Quote ricky969 Replybullet Posted: 20 Jul 2009 at 11:35am

your guess seems to be correct...i can display correctly 123456789012345 (15 digits) however if i have 999999999999999 (15) i get 10000000000000000

I need to find at which point the figures get distorted.
IP IP Logged
ricky969
Groupie
Groupie
Avatar

Joined: 03 Jul 2008
Location: United States
Online Status: Offline
Posts: 53
Quote ricky969 Replybullet Posted: 20 Jul 2009 at 11:51am
the following number gets displayed correctly:999,999,999,999,995
this is where the rounding starts: 999,999,999,999,996 becomes 1,000,000,000,000,000
 
  99,999,999,999,999,999 (17 digits) will be rounded
999,999,999,999,999,999 (18 digits) will be converted to scientific number
 
it doesn't seem to comply with the sql data types
int: (2,147,483,647)
bigint (9,223,372,036,854,775,807)
money (922,337,203,685,477.5808)
 
it would be interesting to understand the concept behind the rounding.
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