cancel
Showing results for 
Search instead for 
Did you mean: 

EDITING SQL SCRIPT IN CRYSTAL REPORTS

Former Member
0 Kudos

I just installed Version 12 and am trying to edit SQL scripts in Crystal Reports that were created in Version 8. When opening the Database tab on the Main Menu, the Query Panel is greyed out and not accessible. I can view the SQL Query but cannot edit it. If someone can advise me what to do I would be very appreciative.

Edited by: Frank Romano on Mar 18, 2009 4:17 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It is not possible to edit the query gnerated in crystal from Crystal 10 onwards, instead you can use add command to create a report using editable query. You can find this option when you try creating a new connection where you can see add command.

Regards,

Raghavendra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Frank,

Here is the SAP Note that says that you cannot edit SQL from Crystal 9 and later

Symptom

In Crystal Reports (CR) 8.5 and earlier, it is possible to edit the SQL statement in the 'Show SQL Query' dialog box. Doing so allows the report designer to modify the SQL statement that CR generates. Starting with Crystal Reports version 9, users are no longer able to modify the SQL in the 'Show SQL Query' window.

How can you control the SQL statement that Crystal Reports sends to the database?

Resolution

To control the SQL statement that Crystal Reports 9 and later uses, use the 'Add Command' feature to create a Command Object. The 'Add Command' feature replaces the ability to edit SQL statements in the 'Show SQL Query' dialog box. Use this dialog box to write your own SQL command (query) which will be represented in Crystal Reports as a Table object.

More Information

-


Additional information about creating and using Command Objects ('Add Command') can be found on our support site and within the Online Help file contained in Crystal Reports.

On our support site search for the technical brief, cr_query_engine.pdf and knowledge base article c2016641 at

http://support.businessobjects.com/search

Keywords

OBJECT ADD COMMAND EDIT SHOW SQL QUERY DATABASE ACCESS MENU MODIFY SQL Crystal Reports Show SQL query Command object , c2017389

Regards,

Raghavendra

Former Member
0 Kudos

Hi,

You cannot edit the SQL script in crystal reports 11 and higher version, if you want to write the custom SQL then use

Database > Database expert > Create new connection > Odbc > Add Command.

In Add command you can write the custom SQL.

Hope this helps!