Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Database field type changed Post Reply Post New Topic
Author Message
kpcrystalreport
Newbie
Newbie


Joined: 16 Nov 2010
Online Status: Offline
Posts: 1
Quote kpcrystalreport Replybullet Topic: Database field type changed
    Posted: 16 Nov 2010 at 6:53am
I have created a report which uses a procedure from a sql server database. it has a field which is of type float. But when i run the report the value in the detail section is rounded to the nearest integer. You may also note that I have ensured that the number format is set accordingly to display decimal digits also. Also i am using this field in a formula field. Even here it is rounding to nearest integer. When i run the stored procedure independently in the SQL Server management studio the value is correctly printed out as something like 10.1485. Any help would be greatly appreciated and keep me from going insane!

Cheers
KP
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 19 Nov 2010 at 4:27am
I am assuming that you have 'Verify Database'...this usually will update the datatype...especially if the sp has changed since the report was created.  Another item to check, is the field in the sp a float. Just recently, I selected NULL for a field and did some processing on it later, and all my decimal values became integer...I actually needed to Convert(Decimal,NULL) to get it to work...sometimes SQL Server is odd that way.
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.