SAP Knowledge Base Article - Public

1823211 - Tables renamed automatically to a different name when performing a set data source location in Crystal Reports

Symptom

  • Table name lost.
  • Table alias renamed after changing data source.
  • In Crystal Reports, when setting the data source location of a report that contains the same table added multiple times, it renames the database tables to the table name, plus an underscore and a number.

Environment

  • SAP Crystal Reports 2008 with Fix Pack 5.2 or above.

Reproducing the Issue

  1. In Crystal Reports 2008 with Fix Pack 5.2 or above, create a report off any data source.
  2. Add one table, then add a second table multiple times with different alias name.
    • For example, if we add the orders tables 3 times, and give the following alias name to each table:
      • Completed_Orders
      • Small_Order
      • Large_Order
  3. Save the report.
  4. Set the location of the report from one data source, to another one.
    • Under the menu "Database", select "Set Datasource Location..."
    • In the “Set Datasource Location” window, open a new data source connection in the “Replace with” area.
    • Then select the Current Data Source connection, and the new connection in the “Replace with” area, and click on the button “Update”

Table Alias Issue.png

    • It will prompt you with a Database Warning window, stating: 
      •  
      • The table “<Table Name>” has already been added to this report with alias “<Table Name>”.
      • Do you really want to add another alias to this table?
      •  
    • Click "Yes" to keep the table.

Alias Issue - 02.png

    • It will display the above warning window the number of times the same table was added to the report. Click "Yes" every time to keep the table.
  1. Notice the table alias name has all change. All the alias table have been renamed from the original table name, plus an underscore and a number.
    • For example, if we add the orders tables 3 times, and give the following alias name to each table:
      • Completed_Orders
      • Small_Orders
      • Large_Orders
    • Then the tables will be renamed to:
      • Orders
      • Orders_1
      • Orders_2

Cause

  • When performing a set data source location, the table alias name should never change.
  • The issue has been identified and logged under Problem Report ID ADAPT01673968

Resolution

  • The issue is resolved in the following product update of Crystal Reports 2008:
    • Fix Pack 5.4 and above.
    • Service Pack 6
       
  • After applying the update, and as it used to be, alias table name will not change when performing a set data source location.

Keywords

CR , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Bug Filed

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1