SAP Knowledge Base Article - Public

1212378 - How to report from a text or ascii file to Crystal Reports


How can I create a report in Crystal Reports (CR) based on the following file types:

  • .asc
  • .tab
  • .csv
  • .txt


CR can report from text or ascii files as long as an ODBC data source has been configured for the file.

Configure the Data Source

To configure the ODBC datasource:

  1. Open the ODBC Administrator in the Control Panel. Click Add in the User or System DSN tab.
  2. Click the Microsoft Text Driver (*.txt; *.csv) > Finish from the list of loaded ODBC drivers. Name the DSN.
  3. Clear the Use Current Directory option > click Select Directory to browse to the directory location of the .txt/.csv/.asc/.tab file used as the data source.
  4. Click Options >>. Click the file type from the Extensions List that corresponds to the file.
  5. Click Define Format to further define the text format for the ODBC driver.
  6. Highlight the file used as the data source in the Tables window.
  7. Select Guess on the top right side of the dialog box. The ODBC driver determines the location of the breaks in the file that indicate a new column. The corresponding data types are also displayed just below the list of column names.
  8. Add the columns. Assign the data types.
  9. Click OK and exit the ODBC Administrator.


NOTE: You can also manually add a column and assign a data type to it from within this dialog box.


Reporting off the Data Source

Once configured, the ODBC DSN is made available as a data source within the Logon Server dialog box window in CR. The newly-configured text driver data source from the list of ODBC DSNs appears. Simply select that DSN and as with other data sources a list of objects that can be inserted into the report is provided.


.CSV .TXT. .ASC .TAB ODBC REPORT DATASOURCE DSN CONFIGURE Seagate Crystal Reports Data Source configuration Text / Ascii files , c2007719 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To


SAP Crystal Reports 8.0