SAP Knowledge Base Article - Public

2114821 - Error when attempting to change datasource location in Crystal Reports 2013 from MS SQL OLEDB to MySQL ODBC connection

Symptom

  • Unable to change data source from MS SQL OLE DB  to MYSQL ODBC connection in Crystal Reports 2013 (CR2013)
  • Changing data source from ODBC to OLE DB connection works fine.
  • On “Set Datasource Location” window updating the following error appears: “Some tables could not be replaced, as no match was found in the new data source. Please specify the table required for any unmodified tables”

1093892-1.jpg

  • On “Set Datasource Location” after updating tables or aliases, the following error appears: "Invalid Argument Provided. Details: The alias requested ‘tablename’ contains a combination of characters which is not considered to be valid."

1093892-2.jpg

Environment

  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • MySQL server ODBC driver version 5.x
  • Microsoft SQL Server 2005 / 2008

 

Reproducing the Issue

  1. Launch CR2013 designer
  2. Open an existing report using OLEDB connection to Microsoft SQL Server 2005/2008
  3. Go to Database -> Set DataSource Location
  4. Create/select an ODBC connection to MySQL server
  5. When Data source location is updated or when table is updated, error message is displayed

Cause

  • When data source is updated in the report to MySQL ODBC, the Crystal Reports will not change the table alias in the existing query. In the query,  the table name and table alias are the same.
  • In MySQL ODBC connection, an alias cannot have the same name as the table. See KBA 1596511 

Resolution

  • Use JDBC Driver for MySQL connection instead of ODBC driver. In MySQL JDBC connection, an alias can have the same name as the table.

Workaround:

    1. In Crystal Reports, go to Database -> Database Expert
    2. On the “Selected Table” section, select the first table used in the report and press F2 key (or right click -> Rename) and rename it by adding a 1 to the end. Example: <TableName>  to  <TableName1>
    3. Now, use the "Set datasource location" option to change the connection from Microsoft SQL  OLEDB to MySQL ODBC in the report.

 

Keywords

Crystal Reports 2013,ODBC,Table,Alias, MySQL, MS SQL, Set Datasource Location, CR, CR2013 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016