SAP Knowledge Base Article - Public

1596511 - Why one '1' is added at the end of the table name when creating a report in Crystal Reports?

Symptom

  • One (1) is added at the end of the table name.
  • Sometimes, Crystal Reports create a table alias and append one (1) at the end. Why does this occurs?
         
    For example: 
        
    When connecting to a specific database, and adding the table: MyTable,
    it displays the table name in Crystal Reports as: MyTable1

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
         
  • ODBC Datasource

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source via ODBC
  2. Add a table to the report, and noticed it add the number one (1) at the end of the table alias name like: <Table1>

Cause

  • Crystal Reports checks the ODBC Drivers capability using “SQL_CORRELATION_NAME”
  • It indicates whether the alias of table can have the same name as the table.
  • It can be fetched by ODBC API: SQLGETINFO which is found in ODBCTEST->Conn menu.

Resolution

  • Switch to an ODBC driver which allows table and alias name to be the same.

Keywords

Crystal Reports, ODBC, Table Alias, Alias name , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016