SAP Knowledge Base Article - Public

3049912 - Not Table listed when connecting to a Text or CSV file using the CR Text File ODBC driver in Crystal Reports

Symptom

  • No tables listed.
  • When using an ODBC connection to a text or csv file, it does not list any tables. It only show "Add Command"
  • In Crystal Reports, when attempting to create a new report to a text file via an ODBC connection using the CR TextFile ODBC driver, it does not list any tables in the Database Expert.

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020

Reproducing the Issue

  1. In the Microsoft ODBC Data Source Administrator, create an ODBC DSN to a text file using the CR TextFile ODBC Driver.
  2. In Crystal Reports, create a new report.
  3. In the Database Expert, under "Create New Connection", double click on "ODBC (RDO)"
  4. In the window "ODBC (RDO)", in the Data Source Name list, select the ODBC DSN to the text file, and click "Finish"
  5. Once connected, notice it does not list any tables to select in the Database Expert.

Cause

  • Text files were not defined to be used as tables when creating the ODBC DSN in the Microsoft ODBC Data Source Administrator.

Resolution

  • Define each text, or csv file to be associated to a table in the ODBC DSN: 
      
    1. Start the Microsoft ODBC Data Source Administrator
        
    2. Select your ODBC DSN, and click on "Configure"
        
    3. Under the tab "General", ensure the "Database Directory" points to the folder where the text files are located.
          
    4. Under the tab "Advanced", define each text files you want to use as a Table by clicking on the button "Define..."
        
    5. Select one of the text file, and click "Open"
        
    6. For the option "Define Table", enter a name for the Table.
        
    7. Check the option "Column Names in First Line" if your text file first row are the column names.
        
    8. Then select the delimiter, which is called "Table Type".
      ( For for example: If your file uses comma as the delimiter for the columns, then select: "Comma" )
       
    9. Cick on the button "Guess" to generate the fields from the text file.
        
    10. Once everything is set, click "OK"
        
    11. You will then be prompted to select another file to define as a Table.
      If you have multiple text files to define, select the next text file, and repeat the steps 6 to 10.
      If you have no other text files to define, click "Cancel"
        
    12. Back to the "ODBC Text Driver Setup" window, click "OK"

Keywords

CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020