EDITING SQL SCRIPT IN CRYSTAL REPORTS

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

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

Similar Messages

  • Cant edit sql expression in crystal reports XI

    when i right click on a sql expression it tries to log into the repository (which we dont use)..
    If I actually log into the repository, the sql expression code still isnt there..
    how do I edit my sql expressions..

    Hi Shanon,
    If the report is saved to your Business Objects server then the report would prompt for log on repository.
    If the report is saved to your desktop and your database is available then it wont prompt you.
    Thanks,
    Naveen.

  • How to enable show SQL Query in Crystal report tool

    Hi,
    How can we enable the show SQL Query under Database tab in crystal report...
    We have a requirement to modify the SQL query in Crystal reports.
    Thanks,
    Gana

    Gana,
    CR has an "Add Command" feature that will allow you to use hand-coded SQL as your data source.
    Look at Defining an SQL Command in CR's online help (F1).
    If a command was used in the original report creation, it's a simple matter to go in and edit that SQL.
    If the report was not originally built w/ a Command you may find it difficult to switch over. In most cases it easier to start over from scratch, creating a new, blank report, that uses the command.
    Jason

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • Passing parameter into SQL statement in Crystal Reports

    Hi all,
    I would like to call Crystal Reports in JSP. I can handle it well now. But I hope to let user input their selection criteria before printing out the report. I know how to get the parameter value in JSP, but I really dunno how to pass these parameter values into the SQL statement in Crystal Report. Actually, is it possible to do so?
    If anyone has idea, please tell me. Thx Thx!
    Regards,
    Betty

    Dear Sir,
    I want to use Crystal Report as a web base using JSP. But, I am getting how to call .rpt file in .jsp file & passing of parameter.
    If you have any idea, please reply as early as possible
    Thanking U.
    My userid = [email protected]
    Regds
    Pankaj..

  • Modify SQL query in Crystal Reports 2013

    Bonjour,
    Je voulais savoir s'il était possible de modifier la requête SQL dans Crystal Reports 2013, car les bases de données de notre application pour bibliothèque utilise un format de date particulier qu'il nous faut corriger directement dans la requête SQL.
    Merci pour vos informations.
    Cordialement
    Claude Marcilly
    Cannes - France
    Hello,
    I wanted to know if it was possible to modify the SQL query in Crystal Reports 2013. Databases of our application library indeed use a particular date format that we need to fix directly into the SQL query.
    Thank you for your information.
    Best regards
    Claude Marcilly
    Cannes - France

    Hi Claude,
    If you are creating reports using tables then go in Database menu and click on show SQL query, this will show the SQL generated by crystal reports.  Now go in database expert and expend your connection and double click on Add Command and past the query which was generated by Crystal and try to modify the date format and click OK.
    Now you need to redesign your reports based on Add command.
    or
    If your reports datasource is Add command you can directly go in add command and change it.
    -Sastry

  • Using HTML script in Crystal Reports??

    Can anyone let me know how to use HTML scripts in Crystal Reports?
    I just need to develop report using HTML so that the output of the report will be in RIch text fomat

    Hi,
    You can't design a report using HTML script.  I'm not exactly clear on what you want to do but if you have an HTML app, you have to design the report in Crystal and from your application, call the viewer.  This will allow you to have the report appear in your program. 
    If you are talking about formatting the report, you can set each object as a class in your CSS and call it from your program. 
    I guess a little more information on what you are trying to accomplish may help answer your question more directly.
    Thanks,
    Brian

  • Where to find the SQL log by crystal reports

    i want to watch the sql log by crystal report loading,but i don't know how to find it , somebody knows it? thanks advanced!

    Hi Wang,
    If you mean to look at the SQL query CR generates, then open the report in the CR Designer > Go to the Database option on the top > Click Show SQL.
    -Abhilash

  • Extracting SQL Queries from Crystal Reports

    I am trying to find a way or a utility to be able extract SQL queries from Crystal reports into a text file for documentation purposes.  These queries are not in the repository, they were entered into each of the reports when the reports were being built and I can't find a way to extract them.  Any ideas/suggestions?

    Hello,
    CR doesn't have the ability, and I don't recall if this has ever been asked previously. Great suggestion for the Idea Place tab in the up right corner of this page.
    If you find a developer it's quite simple to get:
                // log onto the server and then get the SQL.
                rptClientDoc.DatabaseController.LogonEx("van-w-13-dwilli", "xtreme", "sa", "pw");
                GroupPath gp = new GroupPath();
                string tmp = String.Empty;
                rptClientDoc.RowsetController.GetSQLStatement(gp, out tmp);
                // show the SQL but easy enough to save the SQL text to a file.
                MessageBox.Show(tmp, "Data Source Set and SQL Statement", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Of course you need to open the report first, lots of samples on how to...
    Thank you
    Don

  • How to Edit SQL Query in Crystal XI?

    Post Author: sk8skiier
    CA Forum: Data Connectivity and SQL
    I'm wondering if any of you can help me.  We've recently upgraded from Crystal Reports 6 to Crystal Reports XI, the version on my machine is 11.0.0.2178 and is the Professional version.
    In Crystal 6, it was very easy to change the data that you wanted returned by editing the sql query, but in XI, I can only find a way to view the query, not edit it.  Am I missing something?
    Thanks for the help, I appreciate it.

    Post Author: yangster
    CA Forum: Data Connectivity and SQL
    Good news and bad news.  Bad news is you can't edit the viewed sql statement anymore in any version of Crystal 9 or higher.Good news is you can write custom sql commands instead of dealing with having to join tables.  So if you know the sql you want to produce that was in version 6 just copy and paste it into the add command feature and edit it in there and you will be exactly where you want to be.

  • IF Condition in a PL/SQL Script give a report error.

    Hello, I’m German and I hope you can unterstand my Question.
    First, I work with the HTML DB Version 1.6.0.0.0.87 and the Oracle Version 9.2.0.6.
    I create a SQL Report, where a PL/SQL Script return the SQL Statement for the Report. This is my source-code, I have short it...:
    Declare
    sql_str varchar(2000);
    sql_str_select varchar(1000) :=' select dim_sparte …... ';
    sql_str_from varchar(1000) := ' from faktentabelle,dim_sparte ';
    sql_str_where varchar(1000):= ' where … and faktentabelle.zeit_id = :POPUP_ZEIT ';
    sql_str_groupby varchar(1000):= ' group by dim_sparte.name, faktentabelle.zeit_id ';
    Begin
    If ( (V('POPUP_NETZGEBIET') is not NULL) and (V('POPUP_NETZGEBIET') <>
    'Alle Netzgebiete')) THEN
    sql_str_select := sql_str_select || ' ,dim_organisationseinheit.netzgebiet_name ';
    sql_str_from := sql_str_from || ' , dim_organisationseinheit ';
    sql_str_where := sql_str_where || ' and faktentabelle ... and
    dim_organisationseinheit.netzgebiet_name = :POPUP_NETZGEBIET';
    sql_str_groupby := sql_str_groupby || ' , dim_orga .... ';
    End IF;
    sql_str:= sql_str_select || sql_str_from || sql_str_where || sql_str_groupby;
    htp.print(sql_str);
    Return sql_str;
    End;
    This Script include a IF-THEN condition. The Condition is true and the sql-String-Variables are updatet.
    I can get the string with htp.print() and the Statement is OK.
    The report get a Error “report error: ORA-1403: no data found”. If I copy the printet sql String in a new Report Region with SQL String, the Report is OK. When I write IF(true) instead of IF( Condition) the Report is OK, too.
    I try ist with Varibalen V(‘name‘) and with :name. It’s always the same problem. I can’t use IF-THEN-Else Conditions in a Script.
    Please help me and say me what is the problem???
    Thanks,
    Simona

    Hi Simona,
    In the sql region below the region source see that you have " Use Generic Column Names (parse query at runtime only)" check and not " Use Query-Specific Column Names and Validate Query".
    This error you usually get when you have a mismatch in your report heading.
    Vivek
    [email protected]

  • SQL Exception in Crystal Reports

    When i am trying to connect through the JDBC connection from the File -> Log On or Off Server ,i am getting this error
    SQL Exception:[SQL State]null:[Error Message]
    java.io.IOException:Failed to load
    Please help me out with this

    Hi
    Instead of going in File -> Log On or Off Server
    Try to click on File --New -- Expend create new connections and try to create a JDBC connection.
    Also try to search 'HOW TO CREATE JDBC connection for CRYSTAL REPORTS' to find a SAP note.
    -Sastry

  • Cannot Edit Universe Query in Crystal Reports.

    Hi,
    We have Crystal Reports 2008 SP5 installed on a Terminal Server where our report developers can go to develop reports. We have a 4 node BOXI R2 SP4 cluster on the opposite side of a firewall, and have opened the firewall ports so that Crystal Reports can connect to this BOXI cluster and a universe on that cluster, and the developers can publish their reports.
    For some developers, and the issue is intermittent for them, if they open one of those Crystal Reports to edit the universe query, they go into Database Expert and right click and choose Edit query, nothing happens. The Query Editor window does not open. They don't get any errors, other than the Universe Query editor window refuses to open. No errors on the BOXI server side either.
    They can work for a few days and everything works fine, when suddenly this behavior starts. When they report the issue to me and I try it myself, it works fine. I've checked their access rights repeatedly and have even given a user temporary full admin rights to rule out any rights issues, but they stll get this behavior.Just as strange, the problem suddenly will disappear. Often, they will send me an message several hours or days later stating that everything is OK again and they can edit their universe queries in the same reports that refused to work earlier.
    I've also checked the BOXI cluster nodes to see if possibly one of the services had a missing -requestport setting, and was choosing a random port that the firewall could be blocking, but everything looks fine. If I login to the BOXI cluster servers and try one of the reports, I can edit the query just fine.
    Any suggestions? I'm at my wits end.
    Edited by: Perry Provst on Nov 11, 2010 9:18 PM

    I had the same issue and it was because the Universe is having Oracle as Database and I dont have any Oracle drivers installed on my machine. Once i have installed Oracle drivers i was able to view/edit the query panel.
    Hope this would help you.

  • Using Sql Functions in Crystal Reports

    Can SQL table-valued functions be used in Crystal Reports?  The only options I see in the Database Expert are Tables, Views, and Stored Procedures.

    Hi Dan,
    Are you referring to user-defined SQL functions? If yes, then these are not accessible in Crystal Reports.
    You would need to create a stored procedure which calls the function and does the processing and use this procedure in CR.
    - Abhilash

  • Automated Solution for Exporting SQL used in Crystal Reports

    My company has created over 400 reports that are running on Crystal Reports XI. Due to proposed changes in our database, we occasionally need to review the SQL statements of all 400+ reports to determine if any of them would be impacted by the proposed changes. In order to review the SQL used in these 400+ reports, we have had to open each report manually. We would like to know how we can review the SQL used in the reports without having to manually look at each report. I suspect there is a way to either write a program or use a tool that will export the SQL that is used in all reports. In a similar vain, we would be interested in knowing if there is an automated way to identify table names and fields that are used in each SQL statement.

    I see two directions to go:
    1. Review functionalities of .rpt Inspector
    [http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm]
    - it allows rpt mass analyses
    2. Post your question to ".Net Development - Crystal Reports" forum to see if it is possible to access required information through custom application

Maybe you are looking for

  • Defining NTFS Permissions for High Volume Security

    The default NTFS file permissions for the boot volume in Windows 8.1 appear to give Modify access to "Authenticated Users".   That is really permissive.   I have a lot of folders I do not want anyone not authenticated as Administrator to touch.   Of

  • Details of Parked Documents

    Hi We are trying to view the list of Parked documents using FBV0/FBV1. But it gives just the list of parked documents. To view the details, a document should be selected and double clicked. Is there any transaction where we can get list of parked doc

  • Undo changes!!!!

    Hi All I have add,edit,save,cancel button in my form.If user clicks on edit button then he has 2 option either he press save button to save changes or he can press cancel button to undo changes .I am facing problem in 2nd option i.e if user clicks on

  • Backup File Doesn't Work

    Someone please help me! Before I restore my itouch to factory setting, I did a backup. I also saved that backup file in another folder just in case it is lost. But after restoring my itouch, when I right clicked my ipod in itunes, there is no "restor

  • Passing variables and methods between two class files

    I created two simple programs to see what I can learn about how separate class files work together. There are two files, Alpha.java and Beta.java. Both are located in the same folder. Here�s Alpha.java: ********* Alpha.java ********* public class Alp