SAP Knowledge Base Article - Public

2142332 - How to rename a Command Object in Crystal Reports?

Symptom

  • How to change the name of a Command Object?
  • Unable to find an option to change the name of the Command.
  • How to rename a Crystal Reports Command Object, to a more significant name?
  • In Crystal Reports, when adding a custom SQL Query to a report, the name is automatically set to: "Command", how to modify the name?
     
      
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a new report, and connect to a data source.
  2. In the "Database Expert", under the data source you want to write a custom SQL Query for, double click on "Add Command"
  3. In the "Command" window, enter the SQL Query, and click "OK"
  4. Back to the "Database Expert" window, notice the default name is: "Command".
       
    How to change the name of the Command Object?

Resolution

  • To change the Command Object name in Crystal Reports:
       
    1. Open the report in Crystal Reports.
    2. Under the menu "Database", select "Database Expert..."
    3. In the "Database Expert" window, under "Selected Tables", click on the Command to select it.
    4. On the keyboard, hit the key "F2"
        
        2.png  
         
      A black square will appear around the Command name, which indicate you can now edit the name.
         
        3.PNG   
                   
    5. Enter the desired name for the Command, and click "OK" to accept the change.

Keywords

cmd object, CR, cr, rename , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

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