SAP Knowledge Base Article - Public

1874513 - Error: 'The alias requested contains a combinaison of characters which is not consider to be valid.' when attempting to add a table in Crystal Reports

Symptom

  • Unable to add a specific table to a report.
  • Error when trying to rename a table on a report.
  • Cannot create a report based on a database, like MySQL, when using an ODBC connection.
  • In Crystal Reports, when adding a table to a report, it generates the error:
           
    "The alias requested <Table Name> contains a combination of characters which is not considered to be valid."

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a new report of a relational data source. For example: MySQL
  2. Add a Table to the report.
  3. Right-click the Table and rename it using a special character in the new name. For example, add an underscore in the Table name, like: Table_1
  4. When clicking "OK", it generates the error:   
        
    "The alias requested <Table Name> contains a combination of characters which is not considered to be valid."

Cause

  • The error occurs when special characters are used in the Table Alias name.
  • Crystal Reports automatically generates a Table Alias of the same name as the Table added to the report, and if the Table name contains special characters, it will generate the error.
  • Most database does not accept special characters in a Tabe Alias name, like a dot, a forward slash, etc... But it varies depending on the database you are connecting to.
  • List of special characters generally not accepted:   .  :  { } ( ) @ & $ # ^ ! * ~ | % \ 

Resolution

  • If the Tabe Alias name contain special characters that are considered valid characters for the database you are connecting to, then add the registry key: InvalidAliasCharList, and remove the special character(s) from the list of invalid characters.
                 
    WARNING The following resolution involves editing the Microsoft Registry. Using the Microsoft Registry Editor incorrectly can cause serious problems. Use the Microsoft Registry Editor at your own risk. For more information see the SAP Knowledge Base Article 1323322
          
    1. Open the Microsoft Registry Editor (regedit)
        
    2. In the Microsoft Registry Editor, navigate to the path corresponding to the version of Crystal Reports used:
            
      • Crystal Reports 2013, 2016:
                
        • 32bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Database     
                   
        • 64bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Database

                 
      • Crystal Reports 2020:
            
        • HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Database     
                    
    3. Add the String value: InvalidAliasCharList
         
    4. Set the value of InvalidAliasCharList, to a list of characters that are invalid for your database, like: .:{}()@&$#^!*~|%\\\" 
       
      For example:
      • If the underscore character "_" is a valid character for a Table Alias name for your database, then do not add the underscore to the list of invalid characters, therefore add the following invalid characters to the registry key: 
        .:{}()@&$#^!*~|%\\\"

      • If an exclamation point "!" is a valid character for a Table Alias name for your database, then do not add the exclamation point to the list of invalid characters, therefore add the following invalid characters to the registry key:  
        .:{}()@&$#^*~|%\\\"

      • Important Note
        For a list of invalid characters for Table Alias name for the database you are connecting to, consult your database documentation, or your database administrator.

    5. Restart Crystal Reports, and you will then be able to add a table that contain the special character you omitted in the list of invalid Alias Table name.
         

Keywords

CR MYSQL ODBC issue, InvalidAliasCharList , 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