Report Query returning "No Data Found" with bind variables

I put a simple query into Report Query:
Select "bluefish". "name" as "name",
"bluefish"."primary_flag" as "primary_flag",
"bluefish"."status" as "status",
"bluefish"."ID" as "ID" from "bluefish" "bluefish" where "bluefish"."ID" = :P3_XPRINTID
When I test the query, data is returned; however, when I try to run the query using "Test Report" button, I get an error 01403 No Data Found. If I replace the bind variable with an explicit value, the report works.
Anyone have any ideas as to what is causing this problem? I am using the Generic Report Layout, with various output types. I AM editting the query and defining the bind variable before I test the report (otherwise, the query wouldn't run).
Charles

Sometimes if you create a form/report/whatever using the wizards, it will create an After Submit process called something like Reset Page - basically you want to make sure you don't have any After Submit processes that call a Clear Session state (it may say something like Clear Cache for Page).
In your branch, there is also a box that says Clear Cache - you want to make sure that does not have page Number 8 in it or it will clear your session state.
Put the page in Debug mode and read through it - check to make sure your value is getting saved and maybe you can see what is going wrong.

Similar Messages

  • Get_num_value return no data found with headstart 6.5.2.3

    Hi,
    We are migrating an application based on headstart (capi generator 6.0.2.1). Our migration upgrade headstart to 6.5.2.3 (capi generator 6.5.3.4).
    The capi generator 6.5.3.4 generate the get_row function, but this function doesn't call the find_on_stack function. With the old version of headstart, the get_row call find_on_stack. On another project I did for another company, I see that the capi generator 6.5.2 generate the get_row and this function call the find_on_stack.
    The capi generator change after the version 6.5.2. I search on this forum and I see this "2227746 - ENHANCE RULEFRAME PERFORMANCE BY MINIMIZING CAPI USE OF FIND_ON_STACK" !
    Our application has business rules that call get_num_value, get_char_value, etc... These get_???_value call get_row and get_row call slct function of the tapi.
    Before the migration, these get_???_value functions returned always a row. Because the get_row scans the pl/sql table with the find_on_stack function.
    Now, these get_???_value functions return the error no data found !!!. The function doesn't call the find_on_stack, but call the slct function of the tapi. The slct returns no data found.
    I have this bug (no data found) when a business rule is executed from a delete cascade. The parent row is not there and the br returns no data found. The old version search the parent row with the find_on_stack and returns the row.
    So, I suppose that the "ENHANCE 2227746" drop too much find_on_stack call !
    Do you have a patch for this or I modify the capi generator ?
    Thanks.

    Geert,
    The workaround mentioned above is not sufficient. It makes sure the correct value is returned inside a single transaction, e.g. when a transaction is rolled back, but when a new transaction is opened, it will still return the cached values, even though the database value might have changed between the closing of the first and the opening of the new transaction.
    To make sure the correct value is returned, we should also keep track of the id of the transaction in which the cached values are stored. Only when this ID is the same as the ID of the current transaction, we can be sure the cached value is the correct one. In all other cases the database value must be used.
    The following changes can be implemented as a workaround:
    In the CAPI generator package HSU_CAPF:
    - In procedure create_declarations add declarations of package variables to store transaction id for the cached values g_current_row and g_cached_row.
    - In procedure create_init fill the transaction id when g_current_row is filled.
    - In procedure create_get_row:
    - Enclose if-statement as mentioned above, to make sure correct value is returned after transaction is closed      
    - Add extra restriction to the if-statements to determine whether package variables can be used
    - remove part to use value from CAPI stack      
    - fill transaction id when g_cached_row is filled.
    This solution slows down the retrieval of data via the get_% functions. It only uses cached values when they are cached in the same transaction as they are retrieved in.
    Hope this helps,
    Harold Oortwijn

  • Date Picker query showing "No Data Found", works in SQLPlus

    I have created 2 Date Picker items - P2_START_DATE and P2_END_DATE. I have set the format of these to 'DD-MON-YYYY'.
    This is the query I have to select the data based on the values from the date pickers:
    select sample_date,reading from meter_data where sample_date between to_date(:P2_START_DATE,'DD-MON-YYYY') and to_date(:P2_END_DATE,'DD-MON-YYYY') order by sample_date;
    The P2_START_DATE is '20-JAN-2011', the P3_END_DATE is '21-JAN-2011'.
    The query returns "No Data Found" when run in APEX, but when I run this in SQLPlus on the host I get data:
    select sample_date,reading from meter_data where sample_date between to_date('20-JAN-2011','DD-MON-YYYY') and to_date('21-JAN-2011','DD-MON-YYYY') order by sample_date
    20-JAN-2011 .39
    20-JAN-2011 .14
    20-JAN-2011 .14
    20-JAN-2011 .18
    21-JAN-2011 .13
    Can someone explain what I'm doing wrong? I have tried a few different formats, with no luck.
    TIA

    Hi Jeff,
    My Requirement is also looks like same, but am not able figure it out the reason why am getting no data found message in my chart(report).
    Requirement:
    I have a page, where two date picker(html5) items let say P30_FROM_DATE, P30_TO_DATE are there, apart from this i have one button as well,
    when the user select the from and to date from the date picker, and as soon as click on the button (SHOW), need to display the 2D Stacked Bar Char.
    so to achieve this, i have created a blank page, under region i have created a chart (2D Stacked Bar Chart), under items--> i have created two date picker items and one button.
    my query is
    SELECT NULL LINK,
           FLOW_STATUS_CODE LABEL,
           COUNT(ORDER_NUMBER) VALUE
      FROM
           OE_ORDER_HEADERS_ALL
    WHERE
           CREATION_DATE
           BETWEEN TO_DATE(:P30_FROM_DATE,'DD-MON-YYYY') AND TO_DATE(:P30_TO_DATE,'DD-MON-YYYY')
    GROUP BY FLOW_STATUS_CODE;
    Issue:
    Once i select the From and To Date, when am click on Show button, am not able to see as desired chart, instead am getting no data found message in the chart location.
    Can you please tell me how to do this.
    i would like to know that, how do i capture those two date item values in my query, and how do i initiate my report when am pressing button.
    please revert back to my below mail.
    Regards
    Santhosh Kumar. K
    [email protected]

  • Report query with bind variable

    Trying to create a report query for xsl-fo print. For output format I pick "derive from item" then pick the item name from the list, on the next screen, I paste the query with the bind variable. on the next step test query, I always get "data not found" regardless what value I type in. This is the same query that I ran under sql commands without any issues.
    Does anyone run into the same issue as I have when attempted to create a query with bind var ? There is no problem creating a query without bind varibles. . thanks.
    Munshar

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • Discoverer Report  returning ' no data  found '

    Hi  ...
    i  have an issue with one discoverer  report  .
    Discoverer report  name : EDI Price Exception Report.
    when i ran the report  in Discoverer  Desktop edition  It is returning 'No Data Found ' But  i am taken the  Query from admin edition  and tried to  ran in  PL/SQL Developer/TOAD  by setting  Org_id condition
    it's returning Data  . the Desktop Edition of Discoverer for  some specific date  Range  it's giving Data  But  from last month on wards  it's not returning any Data.
    in Discoverer Report  Desktop  it's not retuning the Data from  November to till date
    Oracle  Applications  11i
    Discoverer 4i
    Oracle Data base :9i 
    OS : Windows.
    Attached the Sql  which i used to generate the Report :
    I HAVE USED THE FOLLOWING  :-for initialize the profile options
    EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
    EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
      SELECT A.CUST_PO_NUMBER,
             A.ORDER_NUMBER,
             A.ORDERED_DATE,
             A.ORDER_TYPE,
             -- C.CUSTOMER_ID,
             C.CUSTOMER_NUMBER,
             C.CUSTOMER_NAME,
             B.LINE_NUMBER,
             B.ORDERED_ITEM,
             MSI.SEGMENT1 ACCO_ITEM,                               -- GRW 20060407
             MSI.DESCRIPTION,
             -- MSI.INVENTORY_ITEM_ID,
             (SELECT MCI.CUSTOMER_ITEM_NUMBER
                FROM MTL_CUSTOMER_ITEMS MCI,
                     MTL_CUSTOMER_ITEM_XREFS MCIX,
                     MTL_SYSTEM_ITEMS_B MSIB
               --  MTL_PARAMETERS          MP
               WHERE     MCI.CUSTOMER_ID = C.CUSTOMER_ID                 --1814924
                     AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
                     AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
                     AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID   --869899
                     AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
                     AND MTP.ORGANIZATION_CODE = 'BRM'
                     AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
                     AND NVL (mci.inactive_flag, 'N') <> 'Y'
                     AND NVL (mcix.inactive_flag, 'N') <> 'Y')
                CUSTOMER_ITEM,
                     XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
             B.ORDERED_QUANTITY,
             B.PRICE_LIST,
             B.UNIT_SELLING_PRICE,
             B.UNIT_LIST_PRICE,
                   TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
             apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                B.ordered_item,
                                                B.header_id,
                                                B.line_number,
                                                B.unit_selling_price,
                                                B.attribute7,
                                                B.pricing_quantity_uom,
                                                B.attribute4)
                CUST_SENT_PRICE_CONVERTED,
             ABS ( (B.UNIT_SELLING_PRICE
                    - apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                         B.ordered_item,
                                                         B.header_id,
                                                         B.line_number,
                                                         B.unit_selling_price,
                                                         B.attribute7,
                                                         B.pricing_quantity_uom,
                                                         B.attribute4)))
                DIFFERENCE,
                      MTP.ORGANIZATION_CODE,
             B.SHIP_TO_LOCATION
        FROM OE_ORDER_HEADERS_V A,
             OE_ORDER_LINES_V B,
             RA_CUSTOMERS C,
             MTL_PARAMETERS MTP,
             MTL_SYSTEM_ITEMS_B MSI
       WHERE     A.HEADER_ID = B.HEADER_ID
             AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
             -- Added by Gati on 19-Oct-2012, tkt - INC000000118962
             AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
                                      C.customer_number,
                                      B.ordered_item,
                                      B.header_id,
                                      B.line_number,
                                      B.unit_selling_price,
                                      B.attribute7,
                                      B.pricing_quantity_uom,
                                      B.attribute4)),
                        2) <> B.UNIT_SELLING_PRICE
             --AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
             --AND     a.ship_from_org_id = mtp.organization_id
             AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID          -- GRW 20060413
             --AND     a.ship_from_org_id = msi.organization_id
             AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID          -- GRW 20060413
             AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID       -- GRW 20060407
             AND A.ORDER_SOURCE_ID = 6
             AND A.ORG_ID = B.ORG_ID
             AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between  '01-NOV-2013' and  '03-NOV-2013'
             and mtP.organization_code='BRM'
                      AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
                               FROM HR_OPERATING_UNITS HOU
                              WHERE HOU.NAME = '50 ACCO Canada')
             AND B.cancelled_flag <> 'Y'
             AND B.flow_status_code <> 'CANCELLED'
             AND B.ORDERED_ITEM <> 'INVALID_ITEM'
    ORDER BY a.order_number

    Hi,
    Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
    I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
    You may find another condition or join that limits your data.
    Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
    begin
      fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
    end

  • SLOW report performance with bind variable

    Environment: 11.1.0.7.2, Apex 4.01.
    I've got a simplified report page where the report runs slowly compared to running the same query in sqldeveloper. The report region is based on a pl/sql function returning a query. If I use a bind variable in the query inside apex it takes 13 seconds to run, and if I hard code a string it takes only a few hundredths of a second. The query returns one row from a table which has 1.6 million rows. Statistics are up-to-date and the columns in the joins and where clause are indexed.
    I've run traces using p_trace=YES from Apex for both the bind variable and hard coded strings. They are below.
    The sqldeveloper explain plan is identical to the bind variable plan from the trace, yet the query runs in 0.0x seconds in sqldeveloper.
    What is it about bind variable syntax in Apex that is causing the bad execution plan? Apex Bug? 11g bug? Ideas?
    tkprof output from Apex trace with bind variable is below...
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM(:P71_SEARCH_SOURCE1)))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.01          0          1         27           0
    Fetch        2     13.15      13.22      67694      72865          0           1
    total        4     13.15      13.23      67694      72866         27           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=72869 pr=67694 pw=0 time=0 us cost=29615 size=14255040 card=178188)
          1   FILTER  (cr=72869 pr=67694 pw=0 time=0 us)
          1    HASH JOIN RIGHT SEMI (cr=72865 pr=67694 pw=0 time=0 us cost=26308 size=14255040 card=178188)
          1     INDEX FAST FULL SCAN IDX$$_0A300001 (cr=18545 pr=13379 pw=0 time=0 us cost=4993 size=2937776 card=183611)(object id 68485)
    1696485     TABLE ACCESS FULL PERSONS (cr=54320 pr=54315 pw=0 time=21965 us cost=14958 size=108575040 card=1696485)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     HASH JOIN (RIGHT SEMI)
          1      INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                     'IDX$$_0A300001' (INDEX)
    1696485      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'PERSONS' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       1276        0.00          0.16
      db file sequential read                       812        0.00          0.02
      direct path read                             1552        0.00          0.61
    ********************************************************************************Here's the tkprof output with a hard coded string:
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM('0b')))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.02       0.04          0          0          0           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        2      0.00       0.00          0          8          0           1
    total        4      0.02       0.04          0          8         13           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=10 pr=0 pw=0 time=0 us cost=9 size=80 card=1)
          1   FILTER  (cr=10 pr=0 pw=0 time=0 us)
          1    NESTED LOOPS  (cr=8 pr=0 pw=0 time=0 us)
          1     NESTED LOOPS  (cr=7 pr=0 pw=0 time=0 us cost=8 size=80 card=1)
          1      SORT UNIQUE (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1       TABLE ACCESS BY INDEX ROWID PERSON_SYSTEMS (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1        INDEX RANGE SCAN IDX_PERSON_SYSTEMS_SOURCE_KEY (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=1)(object id 68561)
          1      INDEX UNIQUE SCAN PK_PERSONS (cr=3 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 68506)
          1     TABLE ACCESS BY INDEX ROWID PERSONS (cr=1 pr=0 pw=0 time=0 us cost=2 size=64 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     NESTED LOOPS
          1      NESTED LOOPS
          1       SORT (UNIQUE)
          1        TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                       'PERSON_SYSTEMS' (TABLE)
          1         INDEX   MODE: ANALYZED (RANGE SCAN) OF
                        'IDX_PERSON_SYSTEMS_SOURCE_KEY' (INDEX)
          1       INDEX   MODE: ANALYZED (UNIQUE SCAN) OF 'PK_PERSONS'
                      (INDEX (UNIQUE))
          1      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'PERSONS' (TABLE)

    Patrick, interesting insight. Thank you.
    The optimizer must be peeking at my bind variables with it's eyes closed. I'm the only one testing and I've never passed %anything as a bind value. :)
    Here's what I've learned since my last post:
    I don't think that sqldeveloper is actually using the explain plan it says it is. When I run explain plan in sqldeveloper (with a bind variable) it shows me the exact same plan as Apex with a bind variable. However, when I run autotrace in sqldeveloper, it takes a path that matches the hard coded values, and returns results in half a second. That autotrace run is consistent with actually running the query outside of autotrace. So, I think either sqldeveloper isn't really using bind variables, OR it is using them in some other way that Apex does not, or maybe optimizer peeking works in sqldeveloper?
    Using optimizer hints to tweak the plan helps. I've tried both /*+ FIRST_ROWS */ and /*+ index(ps pk_persons) */ and both drop the query to about a second. However, I'm loath to use hints because of the very dynamic nature of the query (and Tom Kyte doesn't like them either). The hints may end up hurting other variations on the query.
    I also tested the query by wrapping it in a select count(1) from ([long query]) and testing the performance in sqldeveloper and in Apex. The performance in that case is identical with both bind variables and hard coded variables for both Apex and SqlDeveloper. That to me was very interesting and I went so far as to set up two bind variable report regions on the same page. One region wrapped the long query with select count(1) from (...) and the other didn't. The wrapped query ran in 0.01 seconds, the unwrapped took 15ish seconds with no other optimizations. Very strange.
    To get performance up to acceptable levels I have changed my function returning query to:
    1) Set the equality operator to "=" for values without wildcards and "like" for user input with wildcards. This makes a HUGE difference IF no wildcard is used.
    2) Insert a /*+ FIRST_ROWS */ hint when users chose the column that requires the sub-query. This obviously changes the optimizer's plan and improves query speed from 15 seconds to 1.5 seconds even with wildcards.
    I will NOT be hard coding any user supplied values in the query string. As you can probably tell by the query, this is an application where sql injection would be very bad.
    Jeff, regarding your question about "like '%' || :P71_SEARCH_SOURCE1 || '%'". I've found that putting wildcards around values, particularly at the beginning will negate any indexing on the column in question and slows performance even more.
    I'm still left wondering if there isn't something in Apex that is breaking the optimizer "peeking" that Patrick describes. Perhaps something in the way it switches contexts from apex_public_user to the workspace schema?

  • Sorting Interactive Report results in no data found message

    Hi,
    I've got an interactive report which returns results based on the :REQUEST bind variable - I've got a navigation list at the side where all the items link to the current page with different Request values. The IR works fine until I try to sort any of the columns by clicking the header and choosing ascending / descending, at which point it returns no data found.
    It starts working again if I change the last line to OR :REQUEST IS NOT NULL but this breaks the functionality of the report, I want to return only the selected statuses, or all if no request variable is present. I'm guessing that sorting sets :REQUEST to something temporarily and breaks it. My query is below, any ideas?
    SELECT   id,
             job_number,
             appt_start,
             domain,
             pwa,
             status,
             tstamp_created
      FROM   fail_jobs
      WHERE  (status = 'NEW' AND userid_created != 'SYSTEM' AND :REQUEST = 'ARD')
         OR  (status = 'ATR' AND :REQUEST = 'ATR')
         OR  (status IN ('ERR','REV') AND :REQUEST = 'REV')
         OR  (status = 'COM' AND :REQUEST = 'COM')
         OR  (status IN ('PCD','PCA') AND :REQUEST = 'PCD')
         OR  :REQUEST IS NULLThanks

    There are known issues with Interactive Reports referencing :REQUEST value, probably due to some inner logic that also handles it simultaneously - potentially causing malfunction or deadlocks.
    One workaround I've learned is to create a computation to assign :REQUEST to a temporary item (a PXX_REQUEST, for instance) and reference it in the query, instead of :REQUEST. This has worked fine for me in my experience.
    Let me know if that helps - pls sign the thread as 'Useful' or 'Correct' if so, hence more people can benefit.
    tks,
    Kleber

  • Report Performance with Bind Variable

    Getting some very odd behaviour with a report in APEX v 3.2.1.00.10
    I have a complex query that takes 5 seconds to return via TOAD, but takes from 5 to 10 minutes in an APEX report.
    I've narrowed it down to one particular bind. If I hard code the date in it returns in 6 seconds, but if I let the date be passed in from a parameter it takes 5+ minutes again.
    Relevant part of the query (an inline view) is:
    ,(select rglr_lect lect
    ,sum(tpm) mtr_tpm
    ,sum(enrols) mtr_enrols
    from ops_dash_meetings_report
    where meet_ev_date between to_date(:P35_END_DATE,'DD/MM/YYYY') - 363 and to_date(:P35_END_DATE,'DD/MM/YYYY')
    group by rglr_lect) RPV
    I've tried replacing the "to_date(:P35_END_DATE,'DD/MM/YYYY') - 363" with another item which is populated with the date required (and verified by checking session state). If I replace the :P35_END_DATE with an actual date the performance is fine again.
    The weird thing is that a trace file shows me exactly the same Explain Plan as the TOAD Explain where it runs in 5 seconds.
    Another odd thing is that another page in my application has the same inline view and doesn't hit the performance problem.
    The trace file did show some control characters (circumflex M) after each line of this report's query where these weren't anywhere else on the trace queries. I wondered if there was some sort of corruption in the source?
    No problems due to pagination as the result set is only 31 records and all being displayed.
    Really stumped here. Any advice or pointers would be most welcome.
    Jon.

    Don't worry about the Time column, the cost and cardinality are more important to see whther the CBO is making different decisions for whatever reason.
    Remember that the explain plan shows the expected execution plan and a trace shows the actual execution plan. So what you want to do is compare the query with bind variables from an APEX page trace to a trace from TOAD (or sqlplus or whatever). You can do this outside APEX like this...
    ALTER SESSION SET EVENTS '10046 trace name context forever, level 1';Enter and run your SQL statement...;
    ALTER SESSION SET sql_trace=FALSE;This will create a a trace file in the directory returned by...
    SELECT value FROM v$parameter WHERE name = 'user_dump_dest' Which you can use tkprof to format.
    I am assuming that your not going over DB links or anything else slightly unusual?
    Cheers
    Ben

  • CSV spreadsheet returning "no data found"

    Hi,
    In one of the reports, I enabled CSV Output so the report can be downloaded.
    When I download it, using Excel 2000, I have no problem, I can see all the right data.
    However, one of my user, who uses Excel 2002, when saves the file and opens it, returns "no data found" on screen.
    Is this an Excel issue? Is Apex not compatible with Excel 2002? Please advise.
    Thanks!

    Do you have any items on your report page, which you use as a condition for the report? Eventually, you need to compute those items on load. If I remember correctly that was the problem I had before.
    Denes Kubicek

  • Query with bind variable, how can use it in managed bean ?

    Hi
    I create query with bind variable (BindControlTextValue), this query return description of value that i set in BindControlTextValue variable, how can i use this query in managed bean? I need to set this value in String parameter in managed bean.
    Thanks

    Put the query in a VO and execute it the usual way.
    If you need to, you can write a parameterized method in VOImpl that executes the VO query with the parameter and then call that method from the UI (as a methodAction binding) either through the managed bean or via a direct button click on the page.

  • Returns No Data Found

    Hi i have a query like this
    SELECT
    pro.project_name "Project Name",
    POBJ.NAME "Object Name",
    X."Major" "Internal Major",
    X."Minor" "Internal Minor",
    X."Normalized" "Internal Normalized",
    X."IDR" "Internal Defect Rate",
    Y."Minor" "External Minor",
    Y."Major" "External Major",
    Y."Normalized" "External Normalized",
    Y."EDR" "External Defect Rate",
    NULL "Total Defects"
    FROM
    PROJECTS PRO,
    PROJECT_OBJECTS POBJ,
    (SELECT
    MN."PRO_ID",
    MN."POBJ_ID",
    MN."Major",
    MN."Minor",
    MN."Normalized",
    DR."IDR_PRO_ID",
    DR."IDR_POBJ_ID",
    DR."IDR"
    FROM
    MAJOR_MINOR_NORMALIZED MN FULL OUTER JOIN IDR DR
    ON
    MN."PRO_ID" = DR."IDR_PRO_ID" AND
    MN."POBJ_ID" = DR."IDR_POBJ_ID" ) X,
    (SELECT
    EE."PRO_ID" EE_PRO_ID,
    EN."PRO_ID" EN_PRO_ID,
    EE."POBJ_ID" EE_POBJ_ID,
    EN."POBJ_ID" EN_POBJ_ID,
    EN."Major" "Major", EN."Minor" "Minor", EN."Normalized" "Normalized",
    EN."Normalized" / DECODE(EE."External_Effort",0,NULL,EE."External_Effort") "EDR"
    FROM
    EXTR_MAJOR_MINOR_NORMALIZED EN FULL OUTER JOIN EXTERNAL_EFFORT EE
    ON
    EE."PRO_ID" = EN."PRO_ID" AND
    EE."POBJ_ID" = EN."POBJ_ID") Y
    WHERE
    PRO.ID = 2673 AND
    2673 = POBJ.PRO_ID AND
    2673 = DECODE(X."PRO_ID",NULL,2673,X."PRO_ID") AND
    2673 = DECODE(X."IDR_PRO_ID",NULL,2673,X."IDR_PRO_ID") AND
    POBJ.ID = DECODE(X."POBJ_ID",NULL,POBJ.ID,X."POBJ_ID") AND
    POBJ.ID = DECODE(X."IDR_POBJ_ID",NULL,POBJ.ID,X."IDR_POBJ_ID") AND
    2673 = DECODE(Y."EE_PRO_ID",NULL,2673,Y."EE_PRO_ID") AND
    2673 = DECODE(Y."EN_PRO_ID",NULL,2673,Y."EN_PRO_ID") AND
    POBJ.ID = DECODE(Y."EE_POBJ_ID",NULL,POBJ.ID,Y."EE_POBJ_ID") AND
    POBJ.ID = DECODE(Y."EN_POBJ_ID",NULL,POBJ.ID,Y."EN_POBJ_ID")
    In the above query all the X Contents have data and Y Contents are not having data but i need to display if X contents are there and make Y contents as Blank if no data exists
    The Query will return value ony if the data existing both X and Y
    if either one of the X or Y having data it will return no data found how to give the where clause condtion for such cases i tryed many ways was not able to get the result
    thanks
    Sudhir

    I did like this
    Create or Replace View IDRS as
    SELECT
    MN."PRO_ID",
    MN."POBJ_ID",
    MN."Major",
    MN."Minor",
    MN."Normalized",
    DR."IDR_PRO_ID",
    DR."IDR_POBJ_ID",
    DR."IDR"
    FROM
    MAJOR_MINOR_NORMALIZED MN FULL OUTER JOIN IDR DR
    ON
    MN."PRO_ID" = DR."IDR_PRO_ID" AND
    MN."POBJ_ID" = DR."IDR_POBJ_ID
    CREATE OR REPLACE FORCE VIEW "EXTERNAL_DEFECT_RATE" ("EE_PRO_ID", "EN_PRO_ID", "EE_POBJ_ID", "EN_POBJ_ID", "Major", "Minor", "Normalized", "External_Effort", "EDR") AS
    SELECT
    EE."PRO_ID" EE_PRO_ID,
    EN."PRO_ID" EN_PRO_ID,
    EE."POBJ_ID" EE_POBJ_ID,
    EN."POBJ_ID" EN_POBJ_ID,
    EN."Major", EN."Minor", EN."Normalized",EE."External_Effort",
    EN."Normalized" / DECODE(EE."External_Effort",0,NULL,EE."External_Effort") "EDR"
    FROM
    EXTR_MAJOR_MINOR_NORMALIZED EN FULL OUTER JOIN EXTERNAL_EFFORT EE
    ON
    EE."PRO_ID" = EN."PRO_ID" AND
    EE."POBJ_ID" = EN."POBJ_ID"
    now i am trying to create a full outer join i am getting errors like this
    Select *
    from
    EXTERNAL_DEFECT_RATE edr full outer join on IDRS
    on
    idrs."pro_id" = edr."EE_PRO_ID" and
    simileare other join condtion
    but i get Column Ambigiously defined error
    tx
    Sudhir

  • Report Script returns no data and "java.io.FileNotFoundException" error

    When attempting to write to a new file (Eg: C:\TEST.txt), Report Script returns no data and "java.io.FileNotFoundException" error occurs.
    This error occurs only in Essbase 9.3.1.3 release, however it works fine in release 9.3.1.0.
    After running the report the script, it pops up the follwing message:
    "java.io.FileNotFoundException: ..\temp\eas17109.tmp (The system cannot find the file specified): C:\TEST.txt"
    When checked the TEST.txt, it was empty.

    Sorry folks, I just found out the reason. Its because there was no data in the combination what I was extracting.
    but is this the right error message for that? It should have atleast create a blank file right?

  • Af:query with bind variables and Saved Search

    I have a VO and view criteria(VC).
    VC has a criteria item ObsoleteDate with range specified as bindVariables "dateFrm" and "dateTo" I dragged & dropped the named criteria as af:Query with table. Table toolbar has 2 buttons in which I set & clear the bind variables. Data is fetched as per as expected based on the VC & bind variables.
    The problem is,
    If I save my search with bind variables set and swap between the saved searches , all works fine. But the moment I clear bind variables & swap between searches.. "dateFrm" is populated and "dateTo" is null and I get an Exception oracle.jbo.AttrValException: JBO-27035: Attribute Obsolete Date: is required.
    Why is this happening?? Saved search is supposed to save the VC with all the bind values set while saving and clearing bind variables shouldn't affect the saved search, right?? Or I have understood it wrong?
    I am using JDeveloper 11.1.2.3.0
    Thanks

    Try
    like ? || '%'

  • Using external parameters within MS Query returning that data right into a pivot table Excel 2010

    In Excel 2010 i was able to use the external parameters within MS Query returning that data right into a pivot table.  But the parameter on the worksheet will not save in the paremeter setting of the data connection.  And if you save it and open
    it and try to refresh the pivot table Excel stops responding and you have to force the file closed.  I found out the reason to crash is that it did not keep the parameter saved.
    Can this be fixed?

    Hi,
    Just
    checking in to see if the information of Oskar was helpful. Please
    let us know if you would like further assistance.
    Jaynet Zhang
    TechNet Community Support

  • ODT Query Window. Query with binding variable?

    I have the ODT 11.1.0.7.20 installed.
    In "Query Window", I execute an SQL with binding variables. But I only get ORA-01008 errors. How do I do that?
    I want to double click an SQL and load it in "Query Window". How do I do that?
    I want to right click an SQL and select "Open with Query Window". How do I do that?
    In Query Window I want to load an SQL either by drag and drop or by select a function "Open SQL". How do I do that?
    Why none of these functionalities work as you could expect?
    Thanks,
    Tobias

    Finally i found the problem..
    The problem was that i had to remove one line from the properties of my table departments, the property: selectedrowkeys, because it only passed the last selected row.
    Still, i apreciate the help and i had to replace some code in the bean.java , because of the exception error and you didn't had to do that. Maybe i did some configuration in the wrong way and it went wrong.
    Thanks for the help.
    Regards,
    Frederico.

Maybe you are looking for

  • I cant see the graph in discoverer viewer whith was created in the desktop

    Hi,      I need your help!! I have a problem to see a graph in Discoverer viewer. I will detail you the steps that I follow; It was a difficult calculate report to results by Discoverer so, I create a view in the data base which show 3 field, Periodo

  • Billing in Third Party Scenerio

    Hi All, I completed the complete cycle for third party process.While i am trying to do billing for Third Party Scenerio, i getting a warning message "No Billing quantity has been determined".If i ignore it, i am able to create the billing.But the iss

  • JAVAMAP-Sax Parser ...............Linkage error when loading the class.

    Dear all, Do we have any extra things to execute the Java mapping using the Sax Parser? When I am executing the interface mapping ,I am getting the" Linkage error when loading the class" error. Kindly let me know your personnel maildId so that I can

  • Appear after all buttons clicked

    OK, I have a relatively easy question for you guys. I have a slide with four persistent buttons on it and I want a link to the next slide to appear after the four buttons have been clicked. What confuses me, however, is that I'm not sure where to put

  • Games keep crashing since recent OS X updates

    Hey guys, everything's been running great until recently. Games have begun to crash soon after starting up. I'm lucky if I can get more than 2 minutes of game time before it either freezes or automatically closes down. Here's my info via EtreCheck -