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!

Crystal 8.5 and CSV Data Source Problems 1

Status
Not open for further replies.

random621

Technical User
Jul 16, 2003
54
US
I have Crystal Version 8.5.3.975 and am using ODBC to report against a CSV file.

When setting up my report I have several fields where the first 30 - 50 rows contain only numbers, but then later in the file this same field stores letters.

My problem is if I forget to resort that field in Excel in descending order before saving it as a CSV (so that the letters are on top) Crystal treats it as a number field.

Is there anyway to force the number of rows (say 1000) Crystal will scan before determing what type of field it assigns? OR is there a way to change the field type without going through the report wizard again?

I know I could import the information to Access, but would rather no go that route if I can.
 
Excel is a horrible means of creating a data source because it incorrectly formats fields for this sort of thing when saving the file.

Your difficulty is Excel, not Crystal. It isn't a database, and you've already hit upon the solution, which long term should be to NOT use Excel as a database, it isn't one.

You might just create a standard row which is placed in the beginning of every Excel file which contains the proper data types, and then you can design the Crystal report to ignore the first row.

Ugly solution for an ugly database problem.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top