Failed to parse SQL Expression Field

Hi,
I design a report with an SQLExpressionField.  When I change datasource at runtime:
                reportClientDoc.getDatabaseController().setTableLocation(table, tableNew);
I got this error:
ERROR com.businessobjects.reports.sdk.JRCCommunicationAdapter -  detected an exception: Failed to parse expression.
     at com.crystaldecisions.reports.reportdefinition.SQLExpressionFieldDefinition.ta(Unknown Source)
How should I handle SQLExpressionFields?
I am using CRJ (2.0.1.r566)

Could be a couple of reasons.
You can't use SQL SELECT statments in SQLExpressions, they were not nor are they supported to be used this way.
SQLExpressions functions are defined in the Driver you are using so it may be you are not using the same Driver version as originally created with.
Need more info on the driver you are using and the Expression SQL you are using?
It may be you are failing to log on to the new server also.
Don

Similar Messages

  • Classic Report CSV output failed to parse SQL query

    Hi,
    I'm trying to get a CSV output from a classic report. I'm generating the report based on a PL/SQL block that will return an SQL query. But when i download the CSV excel just gives me a:
    failed to parse SQL query:
    ORA-00936: Missing expression
    and shows me the query that the application is trying to parse. I'm also using bind variables (page items) in the PL/SQL block that is returning me the SQL query. I think that the reason that it fails to parse the query is that the query that is shown in excel has no bind variable values.
    Anyone got any ideas?

    Hi Arif,
    run your page in debug mode and check out the SQL statement which is actually executed for the report. That might help to diagnose what is going wrong.
    If you wish you can also post the report SQL statement which is getting executed.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Failed to parse SQL query by one user

    Hi all,
    in my app i have a text-item with a submit button. In this item i type a name and a report after the item-region show me the result(s). this works for all my users (>2000) perfectly, but one of this users become an error in the report-region:
    failed to parse SQL query:
    ORA-01403: no data found
    We try this with the same searchstring on the same computer/browser. If i logged in the result is ok, if the user logged in, the error message shows. If i try this on the computer from the user with me logged in, result ok. If the user try this on an other pc, results error.
    I have an productive and a developer workspace. In the developer workspace the user can try this perfectly without errors. Only in the productive workspace the error shows.
    The SQL-Select in the reprirt ist verry simple:
    select id
    , name
    , raum
    from table
    where instr(upper(name), upper(:P60_SEARCH))>0
    However all users can use this search-field with report perfectly, only this one user has the error. It is no restrictions on this item or report.
    Can anybody help me?

    Carsten,
    user preferences do not have anything to do with the fact where the user resides (apex built in, LDAP, whatever). User Preferences are saved for a named user and they are loaded next time the same user loggs in. For example, if you sort your report on a column x, apex will save this as a setting and next time you call the same report, this report will be sorted the same way. Since you don't have a permission to edit services, you should check your adminstrative permissions and conntact the real administrator of the workspace to do that "purge prefference" for you. I could bet this is the reason you are getting that strange error message.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Report failed to parse SQL query:ORA-01745: invalid host/bind variable name

    Hi,
    We are currently upgrading from v2.2.0.00.32 to v4.0.0.00.46.
    I have copied the applications onto our test server along with the various database objects and data etc.
    When I am running a report in v4, it is failing with the following error: "failed to parse SQL query: ORA-01745: invalid host/bind variable name".
    When I copy the SQL that builds the report into TOAD (on out test server) it runs OK so really cant see why it would fail in APEX. It works fine when I run the query in our APEX v2 and in TOAD in our live server.
    The query is as follows:
    SELECT
    aea.ALTERATION_ID
    ,aea.ALTERATION_ID "ALTERATION_ID_DISPLAY"
    ,aea.assembly_name "Revised BOM"
    ,assembly.description "Revised BOM Description"
    ,assembly.INVENTORY_ITEM_STATUS_CODE "Revised BOM Status"
    ,aea.BEFORE_CHANGE_QTY
    ,flv.MEANING "Alteration Type"
    ,aea.component_name "Part No"
    ,component.description "Part No Description"
    ,component.INVENTORY_ITEM_STATUS_CODE "Part No Status"
    ,aea.AFTER_CHANGE_QTY
    ,TO_CHAR(aea.last_update_date,'DD-MM-YYYY HH24:MI:SS')"Last Update Date"
    ,aea.LAST_UPDATE_BY
    ,aea.COMMENTS
    ,aea.ORACLE_CHANGE_NOTICE
    ,AEA.SELECTION_CRITERIA
    FROM XXMEL_APEX_ECO_ALTERATIONS aea
    , fnd_lookup_values flv
    , (SELECT INVENTORY_ITEM_STATUS_CODE
    ,segment1
    ,description
    FROM mtl_system_items_b
    WHERE 1=1
    AND organization_id = 26) component
    , (SELECT INVENTORY_ITEM_STATUS_CODE
    ,segment1
    ,description
    FROM mtl_system_items_b
    WHERE 1=1
    AND organization_id = 26) assembly
    WHERE 1=1
    AND aea.COMPONENT_NAME = component.segment1 (+)
    AND aea.assembly_NAME = assembly.segment1 (+)
    AND flv.lookup_code = aea.acd_type
    AND aea.eco = :P13_ECO
    AND flv.lookup_type = 'ECG_ACTION'
    AND modify_flag = 'Y'
    ANy help would be great,
    Thanks
    Chris
    Edited by: Cashy on 22-Nov-2010 04:13
    Edited by: Cashy on 22-Nov-2010 04:14

    For some reason, the updatable fields (this is a updateable report) where not connecting to the database properly. Whn I changed them to a report columns and removed the database field reference, the report rendered

  • Sql expression fields in subreports (CR XI)

    Post Author: yyu
    CA Forum: Data Connectivity and SQL
    Is it normal that the sql expression fields don't show up in a subreport?
    I don't see any. Does anyone know how? Thanks!

    Sorry for the delay getting back to you all.
    I set up a report against the xtreme database sample. Added the Customer table, and put the columns "Customer ID" and "Customer Name" on the report. I then created a new SQL Expression and entered the following:
    ( SELECT SUM(`Orders`.`Order Amount`) FROM `Orders`
      WHERE `Orders`.`Customer ID`=`Customer`.`Customer ID`)
    I could save the new SQL Expression, which is farther than I got in the real report. I added the SQL Expression field to the report. But when I try to preview the report, I get an error:
    Error in compiling SQL Expression :
    Failed to open a rowset.
    Details: ADO Error Code: 0x800004005
    Source: Microsoft JET Database Engine
    Description: Unspecified Error
    Native Error: 62411
    I suspect that's the MS Access version of the error I was getting with MySQL.

  • NOT ABLE TO SEE SQL EXPRESSION FIELDS IN CR2008

    Hi,
    I am not able to see the SQL EXPRESSION FIELDS in the FIELD EXPLORER of CR 2008.Can
    you please help me
    BABASHARI

    Hi,
    I would suggest you open the question in the Crystal Reports forum.
    Ingo

  • Failed to parse SQL query: ORA-01403: no data found

    I'm going to post and answer my own question in the hope that others will not have to struggle with this error.
    Using a report of the type PL/SQL Function Body Returning SQL and using generic columns you may run into this error
    failed to parse SQL query:
    ORA-01403: no data found
    The SQL will run stand alone but the report fails.
    There is a setting just below the source you should check:
    "Maximum number of generic report columns"
    In my case the number of columns was dynamic and when it exceeded the number set as the maximium number of generic columns I received the 1403 error.
    Hope this helps someone.
    Greg

    Thanks for much for the pointer. For anyone else struggling with this too, I found that my generic columns had unordered themselves. Reordering them solved the problem for me.
    Edited by: user11096971 on Jul 22, 2010 3:19 AM

  • SQL Expression Fields button not visible in Field Explorer

    Hi,
    On my Crystal Reports installation I can see the button SQL Expression Fields in Field Explorer but it is not visible on client's installation.
    How do I make it visible? I need to create a new report with SQL query for client.
    Thanks,
    Ajay Audich

    Commands are intended to replace the standard linked tables that must users are accustomed to.
    I suppose Commands would be considered an "advanced" feature, considering that they require the developer to be able to hand write SQL (our at least copy it from another SQL editor).
    If you are comfortable writing reading, writing & editing SQL, Commands will open a the door to a whole new level of control when it comes to creating your data sets.
    The biggest problem w Commands is also it's greatest strength... If you're using a Command, CR will assume that you know what you're doing and will not try to rewrite or optimize your SQL in the background. You write it, CR sends it. That means if you write crappy SQL, CR will send your crappy SQL to the db server...
    It also means that you can use join types that aren't available in CR and use sub-queries in in your SQL... Basically anything you can do in the db's native editor.
    HTH,
    Jason

  • SQL Expression fields do not display when no records are returned

    I have a report that uses SQl expression fields to summarize in the Report footer.  When the main report does not contain any records the SQL expression fields are blank.
    Is there a way to force these SQL expression fields to be evaluated evn when the main report does not contain any records.
    Thanks

    Hi,
    You can try this :
    Under Report Options, check "Convert Database Null values to Default".

  • Failed to parse SQL Query - External Tables [Apex 4.0.2]

    Greetings experts -
    Has anyone encountered errors when creating a report in Apex that sources from an external table within the database? I'm using the 4.0.2 version that is packaged with the 11g XE edition on 64bit CentOS.
    For example, I might run:
    SELECT NULL LINK,
    COL1 LABEL,
    COL2 VALUE
    FROM MYTAB;
    Where MYTAB is an external table sitting on top of a comma-separated file. When I go to create the page, I'm prompted with the "Failed to parse SQL" dialogue.
    I noticed that if I did CTAS on the external table, and referenced the CTAS table, my page ran without problem!
    Any ideas? Is this a known "limitation" of Apex?
    Thanks,
    CJ

    Chiedu,
    Please try removing all declarative validations on this tabular form, and see if it works as expected then. There are some limitations on the type of views and joins that are supported by tabular forms when using the new declarative validations, i.e. you'll need a key preserved table in your view or join.
    Regards,
    Marc

  • Passing a variable to an SQL Expression Field

    Is it possible to pass a value or variable to an SQL Epression field?  I want to sum the values of open invoices for a particulat customer and want to do this using an SQL Expression Field.  I need this sum in a  subreport and since I can not put a subreport in a subreport I want to do it using an SQL Expression.
    Thanks.
    Ralph

    That would require a SELECT statement in the expression and they really are not designed to do that.
    If you can't do this client side write a stored procedure then you have full control and CR is just used to display the data.

  • Select Expert or SQL Expression Fields help

    I am trying to do something I would consider very simple but can figure it out.
    I have two tables.  FDC_Trips & Facility.  On the report I can get the FDC_Trips.DivertedbyFacility field to populate a number value because that field is an integer.  But we need the name to show up.  That field is the ID (foreign key) of a Facilty which matches with the field Facility.Code.  Instead of it displaying the DivertedbyFacility number/ID I would like it to be able to show the Facility.Name value.  If I place the filed Facility.Name field on my report it is blank. 
    How can I write a where clause to query the Name of the Facility where the Facility.Code = FDC_Trips.DivertedbyFacility?
    Do I use the Select Expert or SQL Expression Fields.
    Please advise.

    Actually you'll use the Links tab in the Database Expert. If CR did it's stupid auto linking thing... delete them. It usually get's it wrong.
    Now just link the fk field in FDC_Trips to the pk field in Facility. Once you have that done you'll be able to simply drop Facility.FacilityName directly onto the report.
    HTH,
    Jason

  • Chart Query and Failed to parse SQL query

    Hi,
    first of all, this is not a question. It is a reminder for me and maybe for someone with the same problem.
    I just fell over this for the 123124 time.
    I have a 3D Chart Query
    select sum(order_ok) value,
          count(*) maximum_value
    from      v_dialer_campaign
    where campaign_uuid = :P300_CAMPAIGN_IDSaving fails with
    "1 error has occurred Failed to parse SQL query!" ...
    Saving the query without validation works, but does not show any result in the chart.
    v_dialer_campaign is a view selecting from a view in a mssql db over database link and HS.
    running the select in sqlplus or toad works.
    Without any trace on freetds/unixodb/hs side, i would have not found the following line:
    [FreeTDS][SQL Server]The data types nvarchar and text are incompatible in the equal to operator.[FreeTDS][SQL Server]Statement(s) could not be prepared.
    Solution:
    with q as (select :P300_CAMPAIGN_ID val from dual)
    select     sum(order_ok) value,
         count(*) maximum_value
    from     v_dialer_campaign
    where     campaign_uuid in ( select val from q)Maybe the error output when validating the query should be included in the APEX error message.
    Same solution applies for dynamic LOV's reading from HS using a where clause.

    I tried your first query on Apex 3.2 and it created a nice dial chart.
    Is there any ORA-xxxxx error along with the "failed to parse SQL query" message? Did you double check column & table name spelling?
    P.S. The second query is invalid (a superfluous comma after the second column).

  • SQL Expression Fields

    In crystal report 2008,I create a SQL Expression Fields,but how to write the SQL query in the formula workshop,
    Edited by: nylethx1 ye on Jul 23, 2008 9:48 AM

    Select count(*) from Table
    Your query must return a unique value.
    From Don: SQL Expressions were not designed to run SELECT statements. Use a Command object for selects.
    Edited by: Don Williams on Nov 2, 2009 9:29 AM

  • SQL Expression Fields - Not available

    Post Author: anandad
    CA Forum: Data Connectivity and SQL
    Hi,
    I have installed Crystal Reports XI Developer version but in my Field Explorer I dont see SQL Expression Fields tab or item. Did I miss installing any perticular component? I can see the formulla fields but not SQL Expression Fields....
    Urgent help will be highly appritiated.
    Thanks.

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    V361 is mistaken, SQL Expression fields are available in CRXI.
    As with previous versions though, it turns off depending upon the type of database and connectivity used.
    Try using a real SQL database, or if MS Access, set up an ODBC connection to the database.
    In the future include your database in your post to avoid guess work on our part.
    -k

Maybe you are looking for

  • Illustrator fails to launch after CC 17.1 update

    I have just updated Illustrator CC to v17.1 and now it will no longer launch. There is a bouncing icon in the dock for about a second and then no activity, no warnings or errors. My mac is quite old (MacPro5.1 Quad-core running osx 10.6.8) which may

  • Link error: Failed to open external module

    Newbie question #2... I'm in chapter 5 of the tutorial, just added the button to calculate min and max values of the sinewave. I get two link errors when I try to run the program. 2 Project link errors:  Failed to open external module  Failed to open

  • Coping contract quantity

    Hi,    Need one clarification -- At the time of creating a sales order with ref. to a qty contract item quantity ia copied. If contract quantity exceeds in sales order the a warning comes and you can proceed further. Client wants an error so that one

  • Buzzing and lag issue

    Hello, I have the following HP Notebook : HP Pavilion Notebook PC Product No: F4T58EA#ABU OS : Windows 8.1 64-bit Intel(R) Core(TM i5-4200u CPU @ 1.60GHz mem 8gb. The problen is when I watch a video every couple of seconds I get this buzz sound from

  • Logic missing some patches

    I bought and downloaded Logic Pro. Some of the patches seem to be missing something. Half the notes on the keyboard DO NOT WORK.  Its like all the elements that make up some of the patches did not complete. Of all the sounds in the app, I think I hav