[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 388
  • Last Modified:

crystal reports c#2010 connecting to csv, numbers lose decimal places

Hi

I have a csv file that I am creating a report from, the figures in the csv are to lots of decimal places.

then I load the data and start working with it in crystal reports, I am seeing the figures without decimal places...

example:

56.53190986 in the csv file reads 56.000 in the crystal report....

any ideas why this is reading wrong?

Cheers
0
cycledude
Asked:
cycledude
  • 2
  • 2
1 Solution
 
AndyAinscowCommented:
How is the datatype defined in the report?  If it is an integer/long type then change to double or float
What is the local decimal point symbol?  (some countries use a comma not a dot.)
0
 
cycledudeAuthor Commented:
Hi

How do I find out if it is integer/double? and I am in  uk, so decimal should be '.'

thanks
0
 
AndyAinscowCommented:
Somewhere you must (I thought) define which field name is of which type.  (I've never used CR with a csv but with other files types / data sources I define field names/types before designing the report)

If the process is automatic then check the very first value for the fields giving the problem - maybe there are without a decimal part so CR thinks they are integral types.
0
 
cycledudeAuthor Commented:
wonderful, thanks

I had to convert EVERY number in the vcs to x decimal places, even if it was an integer.... that fixed it, it now reads the decimal places everywhere ...

\o/ yay
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now