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

Posted on 2014-08-29
Last Modified: 2014-08-29

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...


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

any ideas why this is reading wrong?

Question by:cycledude
    LVL 43

    Expert Comment

    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.)

    Author Comment


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

    LVL 43

    Accepted Solution

    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.

    Author Closing Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now