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

Export a report to csv format file

Status
Not open for further replies.

mikiap

MIS
Nov 27, 2003
27
CH
I have a problem with exporting a report to a csv. When exported it loses the data in. It should be like this:

Sep-03,99.9421,99.9884,20.0000
Oct-03,100.0000,100.0000,0.0000

and instead it looks like:

09/03,100.0000,100.0000,0.0000
10/03,100.0000,100.0000,0.0000

I don't understand why. I checked the format of the data not to have any ","...and it looks fine.

Any idea?

Thanks
 
Depending upon your version of Crystal and the data types involved, there are various approaches to fixing this.

The date you can fix by using:

totext({table.date},"MMM-yy")

Th other issues are rounding, except i the last case where 20 became 0, which I'll assume is because you're using the wrong database connectivity (perhaps using a database ODBC driver rather than the CR supplied one).

The first thing you should do is apply the Service Pack for whatever version of Crystal you're using.

I just exported a test from CR 8.5 to CSV and the rounding was preserved, so right click these numbers and select format field->Number->Customize and make sure that the decimals and rounding are at .0001

If you still have a problem, post your CR version, database type, connectivity used, real example data as displayed on the report, and the real exported values, and alternatively try the export to a text file.

I also have no idea what "I don't understand why. I checked the format of the data not to have any ","...and it looks fine." means, if it's looks fine, why the post?

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top