Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have an application that writes a number of reports using Crystal Reports through a C# application and produces a pdf document as the output. I'm trying to add a new report. The data for the reports comes from a series of csv files.

I've added in the fields in the details section, however the report has misinterpreted the data types of some of the fields. It's taken an address as a number, a time field as a number and a number as a string.

How can I manually correct the field type. I can't find any option in any of the menus or property windows. I can't believe this option isn't available somewhere.

Thanks
Posted
Updated 15-Feb-10 11:12am
v2

Crystal Reports tries to keep DataSchema in Typed DataSets (.xsd files). You open XSD files and change the data types.
 
Share this answer
 
A Crystal report keeps Schema of data in XSD, Usually in same folder.

An approach which i know works for sure is that:
1. you can load the data from CSV to DataSet (see connectionStrings.com for connectionString for CSV files).
2. Then do export schema on dataset to get schema.
3. Update the schema to your data types in XSD file.
4. Use XSD as data definition in your reports. See http://www.c-sharpcorner.com/UploadFile/rsubhajit/CrystalReportwithDataSet03012006060655AM/CrystalReportwithDataSet.aspx[^] on how to develop reports using XSD.
 
Share this answer
 
Thanks

(can't find how to reply to first answer)

Are you saying that Crystal Reports internally keeps everything as xml? ie the original csv file is translated into xml? Where is the xsd file stored, I can't find one anywhere?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900