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

supress rounding for numeric field?

Status
Not open for further replies.

njpost41

Programmer
Dec 15, 2005
4
US
Hi,

Currently a crystal report is getting 359.9999 from a dataset. Even with rounding set to 0.0001 it displays 360.0 which is wrong. How can I supress rounding or get it to display 359.9999?

Many thanks!
NJP
 
Doesn't make sense if the rounding is set, perhaps you set the decimals to 1?

You need to adjust both.

-k
 
Decimal is set as 1.0000 and Rounding is set to 0.0001. Could this be a bug? Can the Rounding be suppressed? Thanks.
 
Go to Control Panel / Regional and language Options / Customize and see where your workstation (not Crystal) wants to round to.

DataDog
'Failure Is Not An Option'
 
What do you see when you do a browse data on the field within Crystal?

There are many known issues, one common one is that people use the Oracle ODBC driver instead of the Crystal supplie Oracle ODBC driver, which can alter precision.

I should have already beaten you up for not posting basic technical information:

Crystal version
Database/connectivity used
Example data (what Crystal sees)
Expected output (what you want)

-k
 
I don't see a rounding setting in the control panel but instead set the number of decimal places to 4 and still got 360.0. Puzzling! Thanks.
 
I consider myself beaten! I'm new to this site and an inexperienced Crystal Reports programmer. Apologies.

Visual Studio Dev. Envir. 2003
.NET Framework 1.1
Crystal Reports for VS .NET

Access database so OleDb objects are used - if there is a CR version of the driver I'm pretty sure I'm not using it. Where would I find these drivers? Can't find them under Program Files --> MS VS .NET 2003.

When I click on Browse Data the window title is ADO.NET (XML), XML File Path is disabled, Use VS Data Class is checked, and VS Data Class Name is the name of the DataSet I created in the project. When I click Finish I get an error that Logon failed. Probably cause it's not directly hooked to the db right?

Data send to CR from the DataSet is 359.9999. CR shows it as 360.0 but I want it to show as 359.9999.

Thanks!
NJP


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top