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

How can I keep decimal values in MS Access data in my Crystal Report?

Status
Not open for further replies.

carynbo

MIS
Feb 11, 2003
57
US
When linking to an MS Access table from a Crystal Report, is there a way to keep decimal values when reading in numeric fields?

The Access table that my report uses contains numeric fields defined as 'double' with 1 decimal place. When reading the data into Crystal, Crystal rounds and stores the incoming values as integer (evident when I 'browse data'). Since Crystal is rounding rather than using the specific decimal values, my report results are incorrect, often by 0.4. Even though I can use a decimal format to display the report fields, the original decimal values have been lost, and the displayed values are incorrect.

Any way to define incoming table values to keep their original (decimal) format and values?

Any ideas would be of great help to me.

Thanks, Caryn.
 
I'll bet that your problem is that the File->Options->Fields->Number is set to not show decimals.

Try right clicking the field and selecting format field->Number->Customize and adjust the Decimals and Rounding.

The browse data honors what you have set as the default for numbers.

I just tested using Access 97, CR 8.5, using both direct connectivity and the MS supplied Access ODBC driver using a Number field defined as type Double and it preserved a single decimal, the problem is very likely display only and having the default set, and not understanding it's impact.

-k
 
K,

Thank you SO much for you response. The answer to all of my problems was in your advice - to read in data as decimal through the File->Option->Fields->Number setting.

Thanks again for the quick, correct diagnosis and solution!!

Caryn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top