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

Similar Messages

  • 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.

  • Complete novice needs help getting SQL Query into Crystal Reports XI

    Post Author: MissMarnie
    CA Forum: Data Connectivity and SQL
    So I was given an intro level web course and a monster reference guide in prep to format a report. One of our developers wrote me everything I need for the report into a SQL Query and now I'm supposed to format it in CR XII literally do not know what to do from here. I'm able to set up the correct server as a datasource, if that's useful, but I don't know how to make the querey into a bunch of formattable fields in  CR. If anyone can walk me through this, I'd be so grateful. I've attempted to look up SQL query in both the help and the book but I keep hitting a wall. The help dialog says things like "press this button" with no reference to what "this button" is. I'm sure it's obvious to the knowledgeable but I'm in a complete fog. Thanks in advance   

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    IF you're trying to get assistance with setting up a query as the source for a report, try posting your Crystal version and the database type.
    Different software works differently.
    In CR 9 and above, under the connection to the database you'll see Add Command. Select that and you can paste the query in.
    As for not knowing how to generate a report, that requires experience, there's no generic solution of course..
    -k

  • 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

  • Crystal Report 2013 Vendor Code 102

    Hi,
    I have been getting this error database vendor code 102 in Crystal Report 2013.
    I have written my query in Command and created 2 date prompts of type date / datetime which is passed in query as mentioned below
    ('?From Date)
    ('?To Date)
    I am using SQL Server 2005 ,
    Now SQL Server 2005 stores datetime as yyy-mm-dd hh:mm:ss 000 and when i am selecting the dates in Crystal, it is entered as dd/mm/yyyy or dd/mm/yyyy hh:mm:ss
    how do i make both the formats compatible ?
    Is this the reason that i am getting Vendor Code 102 error ??
    Can anyone suggest ?

    hi Shivani,
    you should be able to use the CONVERT() function on your datetime field in order to have it match up with the format of the command parameter.
    as per this microsoft article, it looks like the value parameter should be 101.
    not sure if this particular syntax will work as i don't have sql server...
    CONVERT(VARCHAR(10),{your date field|, 101) = {?your command parameter}
    -jamie

  • Cannot load report from server in Crystal Reports 2013 Viewer

    Hello,
    I am having trouble opening a report that is hosted on a Crystal Reports Server (2013) from the Crystal Viewer.  I've created and uploaded the reports using the report designer (version 2013).  The reports have been uploaded using the "Save As -> Enterprise" to save to my enterprise server.  This part works fine.  I then navigated to the Crystal Reports Viewer to open my report (that I just uploaded w/ the designer) from the server.  Depending on the report, one of two things happens:
    1.) I get a loading bar at the bottom right of the screen that says "Operation in progress . . ." followed by an error message:
    Unable to Refresh Report
    A problem occurred while refreshing on the server. The report may not be configured properly for refresh.
    Please contact your server administrator. (me)
    2.) I get a loading bar at the bottom right of the screen that says "Refreshing <file name of the report> (<server name>)" followed by... nothing.  The loading bar goes away and nothing happens.  It goes back to the screen that shows when the application first loads (blank canvas).
    I've taken some basic troubleshooting steps to try and rule out any potential issues that came to mind, but I've not been successful.
    Any help would be appreciated, thanks!

    Hi
    Check the below thread
    Crystal Reports 2013 data didn't refresh using OLE DB Provider for SQL Server
    With Regards
    Balaji Sampath

  • SAP tab in Crystal Reports 2013 issue

    We are using SAP Crystal Reports 2013 SP3 to build reports on BEX queries (BW 7.2). Creating a report via 'File' --> New connection --> BW MDX driver works fine, I can select bex queries & cubes and see the data. However SAP provided tab 'SAP' does not work as expected. When adding a new bex query using SAP--> Create new report from a query, I can see the list of queries and select one but it does not open and throws the following error -
    "An error occurred while generating a new report templete.
    No error"
    Using the "File" option any change to the .rpt file forces BO admin to update "DB logon" information in CMC (currently i cannot save .rpt file directly on enterprise from Crystal client due to some issue)  and we want to avoid this kind of maintainence using SAP authentication provided by using SAP tab, also the Crysal report prompts when run from BI launch pad request for prompt values twice (once for the report and once to pull list of values for each prompt) which can be avoided using SAP tab. I thought access to dev BW server is fine since the "File" tab works fine. Our BASIS team confirmed BOBJ dev servers have access to BW gateway. Am I missing something here, please help me with your experience and ideas to troubleshoot this as the only solution i could google was from a 2012 SAP recommended article to fix reginfo configuration files on SAP server
    I reinstalled Crystal Reports client twice to make sure intallation was not the issue.
    Thanks
    GORO.

    Hi Abhilash,
    Thanks for your response.
    Yes reports are working in CR 2013 designer.
    Getting Alignment and long spaces between the paragraphs issues even though report has properly designed on designer.
    After exporting to pdf getting above errors...
    -Srinivas

  • Unable to create a crystal report 2013 on the top of SAP BW 7.00

    Hello Team,
    We are trying to connect SAP Crystal Reports 2013 to SAP BW 7.00 SP26. This crystal report is being developed on the top of a BEx query accessing through OLAP.
    1.  We are getting an error- 'Internal Error: The reports applicatiton server failed'.
    2. Also, when we try to upload the same report from CMC, we get an error."...................Failed to read data from the report. Reason: Unable to open the OLAP Cube......."
    Please advise.
    Thanks.

    BI Platform
    -Abhilash

  • Help with SQL query into Crystal

    Afternoon all,
    I am trying to convert the following SQL query into Crystal by using the tables given in the query however the relationship given in the query is bit awkward, in a sense that I cannot create a relationship under Crystal desgin.
    Here is the query
    select count(order_progressed.order_no),reason_code
    from order_progressed,lab_reasons, rework_groups
    where
    order_progressed.date_created=Today
    and (order_progressed.order_status=from_gate
    and lab_reasons.reason_code between from_reason and to_reason)
    group by lab_reasons.reason_code
    order by 2
    We have three tables
    1: Order_Progressed
    2: Lab Reasons
    3: Rework_Groups
    Order_progressed can be linked with rework_group by Status (if you see the line order_progressed.order_status=from_gate)
    However how to link the following line?
    lab_reasons.reason_code between from_reason and to_reason
    I mean when I try to link it by Lab Reasons.Reason Code to From_reason, to reason, it doesn't seem to work.
    The report is grouped by Lab Reasons. Reason Code, so I really have to some how create a relationship between Lab Reasons table and Rework_Group table.
    This is what I get when I run the same query into Crystal using the relationship
    SELECT lab_reasons.reason_code, order_progressed.date_created, order_progressed.order_no
    FROM   maxmast.lab_reasons lab_reasons, kevin.order_progressed order_progressed,
    roger.rework_groups rework_groups
    WHERE  (order_progressed.order_status=rework_groups.from_gate) AND
    ((lab_reasons.reason_code=rework_groups.from_reason) AND
    (lab_reasons.reason_code=rework_groups.to_reason)) AND (order_progressed.date_created>={ts
    '2008-01-01 00:00:00'} AND order_progressed.date_created<={ts '2008-12-17 00:00:00'})
    Any ideas?
    Many thanks
    Kind Regards
    Jehanzeb

    Sastry I didn't understand why did you use Lab_reasons.reason_code twice in your SQL.
    What I have done since I posted this thread,
    I created a command like this
    Select *
    from rework_groups,lab_reasons
    where
    lab_reasons.reason_code between from_reason and to_reason
    Then I took out the lab_reasons table and rework_groups table, then I linked the order_status from Order_progressed table to From_gate of the newly created table (I called it Reason_Code).
    This made the report running but it is crunching quite allot of numbers. I wonder if I made a mistake somewhere?
    Oh and please note, I'd like to create an SQL (if need be) without the date entry which was done in the original SQL because I'd like to setup my own date range within Crystal Reports instead of getting passed by SQL itself.
    This is how it looks like in Crystal now.
    sae1_live
    SELECT order_progressed.date_created, order_progressed.order_no, order_progressed.order_status
    FROM   kevin.order_progressed order_progressed
    WHERE  (order_progressed.date_created>={ts '2008-01-01 00:00:00'} AND
    order_progressed.date_created<={ts '2008-12-17 00:00:00'})
    EXTERNAL JOIN order_progressed.order_status={?sae1_live: Reason_Code.from_gate}
    sae1_live
    Select *
    from rework_groups, lab_reasons
    where lab_reasons.reason_code between from_reason and to_reason
    EXTERNAL JOIN Reason_Code.from_gate={?sae1_live: order_progressed.order_status}
    Regards
    Jehanzeb

  • Crystal Reports 2013 java-error "java.lang.ClassCastException: class com.crystaldecisions..." when promoting

    Hi,
    when promoting "Crystal Report 2013" report (with data connectivity BW MDX Query) from BO DEV to BO PROD with BO Promotion Mgmt (LCM), we get the following error message in LCM jobs history:
    Resolution Status=Overwritten, Dependency Status=All the required dependencies are included.,
    Commit Status=Commit attempted and failed.,
    Promotion Status=Failure : Object promoted. Update failed.
    Error: java.lang.ClassCastException: class com.crystaldecisions.sdk.occa.report.lib.ByteArray:java.net.URLClassLoader@1d634758 incompatible
    with class com.crystaldecisions.sdk.occa.report.lib.PropertyBag:java.net.URLClassLoader@1d634758
    The report itself is present on BO PROD, but the overwrite (BW DEV MDX Query-> BW PROD MDX Query) is not applied, so report connectivity still points to the BW Query on the development system :-( .
    Moreover, the overwrite itself is detected when the job is "test promoted" ("active overwrite").
    Before, we successfully were able to transport crystal reports 2013 with overwrite (the connection then pointed to BW PROD). No idea yet what suddenly changed that...
    Any ideas what causes the error and what can fix it (no posts found, no SAP note, google also no hits)?
    Best regards
    Florian Pitschi

    Update:
    After more investigation, it looks as if the BO Server "CrystalReports2013ReportApplicationServer"
    from time to time has an issue - not only when promoting, but also when viewing publications that contain Crystal Report documents or when executing them, the java class error or similar issue is thrown.
    Did sb face similar behaviour and knows what is the root cause for "CrystalReports2013ReportApplicationServer" not working probably and throwing the java-class error? - it was running fine for several months, now, the class error showed up twice in one month.
    We need to find out what is causing the issue (aleady checked tomcat and BO-logfiles...).
    Best Regards
    Florian

  • BW Connect To Crystal Report 2013 : issue

    Hello Expert ,
    i am trying to do Connectivity between BW to Crytal Report 2013 .
    i Followed the Steps to conect with sap bw server .
    SAP Toolbar -> Create New Report from Query .
    And in Crystal Report 2013 , May be not Required by integrity tool kit due to its by default .
    Can you please Help me to solve this issue :
    Below i attached one Snapshot.
    - Thank you.
    ~ Jatin Chauhan

    Hi - have you installed the SAP Integration Kit, as mentioned here? http://scn.sap.com/community/bi-platform/businessobjects-bi-for-sap/blog/2008/02/19/businessobjects-and-sap-part-2
    Separately, I recommend going with Crystal for Enterprise with BW; lately SAP has said to only use Crystal Reports 2013 if you need more functionality with SAP ERP than Crystal for Enterprise

  • Crystal Reports 2013 on SAP BW

    Hi Gurus,
    We are trying to establish connection between Crystal Reports 2013 and SAP BW 7.4. Could you please let us know whether we can create Crystal Reports on following BW objects or not?
    -BW BEx Reports
    -BW Cubes
    -BW DSOs
    -BW Master data Info Objects
    -BW Multi Provider
    Regards
    Viswanath

    Hi Manoj,
    Using the SAP BW MDX Query driver, you can design formatted Crystal reports that are based on data that is stored in SAP NetWeaver Business Warehouse (BW). You base these reports either on queries that are created with SAP Business Explorer (BEx) Query Designer, or directly on the cubes in BW.
    See this : Crystal Reports 2011: Connect to an SAP BW data source
    Thanks,
    DJ

  • Crystal Reports 2013 SP3 crashing

    Hello,
    We installed Crystal Reports 2013 SP3 to all developers and they have been noticing that Crystal is crashing.
    It basically crashes on different scenarios and Crystal freezes and shows the error Crystal Stopped Working.
    I have gathered different scenarios like:
    1. Report was open, doing nothing when getting error crystal stopped working.
    2. Report was open, re-titled a column, saved the file click on refresh button to re-run query with same parameters and got the same error
    3. Open the report set parameters for the past month to run it and get error not responding.
    We have re-installed Crystal on different computers and the same issue persist, even in Citrix we have noticed this as well.
    Has anybody seen this behavior and found any solution for this?
    Thanks,
    Daniel

    Hello,
    I got new logs, but shows exactly the same as before. The same error lines
    But It failed few minutes ago, around 3.10pm and as you see the log the error show at 1.45, so I'm not sure if it's related to database issue.
    I'm checking the database logs and show the same error message coming from multiple desktops (which we believe are all the crystal developers, but this probably means that they sometimes use wrong password for that in their report...)
    This is what happened this time:
    Crystal 2013 SP3
    This time it failed when developer was trying to update a command object, it stopped working
    Crystal 2013 SP5
    In 1 day it stopped working twice (when you have to close crystal completely), and stopped responding multiple times (screen grays our and shows the stop responding)
    Thanks,
    Daniel

  • 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

Maybe you are looking for

  • My iPhone cable caught fire. What steps can I take?

    I mostly charge my phone via my laptop. The cable has been acting up the past week or so, (computer said USB disabled, etc.) I also noticed some bunching near the end. Decided it was probably time for a new cord, but didn't think much else of it. Ton

  • Amplifier for Inspire T7900 speakers.

    Hi, for some while ago my subwoofer suddenly stopped working, and since the shop I bought it at has shut down, I couldn't get it fixed at all... so now, nearly a year later, I want to use my 7 speakers. Problem is, when I plug them into my computer u

  • I can't download apps with ios 6

    i have downloaded iOS 6 and now I can't download apps, books or anyhting for that matter. What can  I do to resolved this???

  • Want to Group by Std Prices

    HI Frds I have a requirement that i have to group similiar standard price. For Eg.. month year            std price 001 2008              26.022,37 002 2008              26.613,32 003 2008              26.613,32 004 2008              26.613,32 Accord

  • Mouse over events have just stopped working

    My mouse over effects have stopped working. 1/ Dock does not longer show tips and does not magify 2/ Drop downs don't highlight with the blue bar I've trashed the preferences file and also reset/shutdown the mac but it's still not working. Can anybod