Refresh SQL Report (Submit Page Item)

I want to add a search field in a SQL Report. I have something like this
SELECT * FROM emp
WHERE  emp_no  LIKE  :P1_SEARCH || '%'I want to do the search asynchronous, on keypress. The problem is that a SQL Report doesn't have a "Submit Items:" atribute like a interactive report.
So after i refresh the report:
$a_report($x('P1_REPORT_ID').value,'1','10','100');The report is refreshing (the circle icon on top of the screen) but nothing changes cause the :P1_SEARCH doesn't submits.
How could i submit a page item from JS ?
King Regards,
Cearnau Dan
PS: I'm using APEX 4 and using dynamic actions it's the same like the Javascript call.(still doesn't submits the :P1_SEARCH item)

Hi Dan,
I would suggest not to use the undocumented
$a_report($x('P1_REPORT_ID').value,'1','10','100');It's very likely that it will be changed in APEX 4.1
Dan.Cearnau wrote:
PS: I'm using APEX 4 and using dynamic actions it's the same like the Javascript call.(still doesn't submits the :P1_SEARCH item)That's true, but have a look at Anthony's blog posting http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html which explains a workaround to pass the new values for a classic report as well.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf

Similar Messages

  • Report- Pl/sql function returning sql query parsing page items as text?

    Hi Team,
    I am facing a strange issue .
    I have four page items namely
    1)JOB_CODE
    2)MIN_EXP
    3) MAX_EXP
    4) SOURCES1
    I have a report of the type "Pl/sql function returning sql query"
    declare
    v_sql varchar2(4000);
    begin
    if (:JOB_CODE IS NOT NULL and :MIN_EXP IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql:= 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:JOB_CODE IS NULL and :MIN_EXP IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:MIN_EXP IS NULL and :JOB_CODE IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where v_experience_years <= :MAX_EXP and V_REQUIREMENT = :JOB_CODE and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:MAX_EXP is null and :JOB_CODE IS NOT NULL and :MIN_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    end if;
    insert into query_list values (v_sql);
    insert into debug values (:JOB_CODE , :MIN_EXP , :MAX_EXP , :SOURCES1);
    return v_sql;
    end;
    Please not that I am insertin the query into a table called Query_list and the page item values into the table called Debug thru the pl/sql function which returns teh query.
    Now I select the data from the debug tables.
    select unique(query) from query_list;
    select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like '%:SOURCES1%'
    select * from debug;
    JOBCODE     MINEX     MAXEX     SOURCE
    21     1     10     donkeyHire
    And if I run the query in sql I get some records returned
    select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = 21 and v_experience_years >= 1 and v_experience_years <= and source like 'donkeyHire'
    V_CANDIDATE_ID     V_FNAME     V_CURRENT_EMPLOYER     V_EXPERIENCE_YEARS
    2     Vengu     Andale Tech     4
    But the record does not show up in the report!
    does this type of report parse page items as text?
    Why is it so?
    Waiting for an early reply.
    Thanks,
    venkat

    Venkat - You don't want to put ':SOURCES1' in quotes like that.
    Scott

  • Discoverer Viewer Report with Page Items Slow Performance

    I created a report in Discoverer User that has page items and parameters and runs fine (under 3 minutes) in Discoverer User, but when I try and run it in Discoverer Viewer it takes a long time. It took over 70 minutes before manually terminating it. I made a copy of the report and removed the page items and tried to run it again in Discoverer Viewer and now the report runs in under 3 minutes. Any idea why a report with page items would run in Discoverer user fine, but not discoverer viewer?
    I am using Oracle Business Intelligence Plus 10g (10.1.2.55.26)

    As long as you can access the middle-tier server where Discoverer Viewer is running, you should be able to run and view Discoverer worksheets.
    While it is difficult to even start guessing what the problem might be, if the machine you installed Discoverer on has DHCP addressing, you will run into problems.
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN : http://www.oracle.com/technology/products/bi/
    Discoverer : http://www.oracle.com/technology/products/discoverer/
    BI Software : http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples : http://www.oracle.com/technology/products/bi/samples/
    Blog : http://oraclebi.blogspot.com/

  • Submit page item using AJAX

    Hi All,
    Thanks for any help in advance.
    I am trying to submit an item into the session by using AJAX iin version 4.1
    I have a application process which is an on demand: run this application process when requested by a page process.
    begin
      :P4_FISCAL_YEAR2 := :AJAX_4_FISCAL_YEAR2;
    end;then in the item :P4_FISCAL_YEAR2 have the html form element attributes set to:
    (also the page item is set to None(Default) on page action when value changed.
    onchange="selectChanged6(this)"and a page process
    <script type="text/javascript">
    function selectChanged6(filter)
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=SET_4_FISCAL_YEAR2',0);
    get.add('AJAX_4_FISCAL_YEAR2', filter.value);
    var ret = get.get();
    </script>The item doesnt seem to be submitting into the session and I cant figure out why, Thanks

    Marie,
    I think I have acomplished what you are looking for but if your goal is quick response time then this can fluctuate since there is 1 ajax call made to set your item value and another ajax call for every chart you want to refresh.
    This solution assumes the following:
    1. all reports are in the same language and in english.
    2. all reports are flash charts.
    here is a demo: http://apex.oracle.com/pls/apex/f?p=43401:23:0
    Go into your chart template and add the class refreshable_chart
    <div class="rounded-corner-region refreshable_chart" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    ...Create the following dynamic action on your chart page:
    Name: refresh_chart
    Event: Change
    Selection Type: Item(s)
    Item(s): P4_FISCAL_YEAR2
    True actions:
    Sequence: 10
    Action: execute pl/sql code
    Code:
    NULL;
    {code}
    Page Items to Submit: P4_FISCAL_YEAR2
    Sequence: 20
    Action: Execute JavaScript code
    Affected Elements:
    -- Type: jQuery Selector
    -- jQuery Selector: .refreshable_chart
    Code:
    {code:javascript}
    this.affectedElements.each(function(){
      apex_RefreshFlashChart(&APP_PAGE_ID., this.id.substr(1), 'en');
    {code}
    Good Luck,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Dec 14, 2011 10:33 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Refreshing sql report region based on values from another region - 4.0

    Greetings All,
    I have a page with two regions, say region 1 and region 2. I have a before header process that fetches values from db based on criteria entered from another page. Region 2 is a sql report region with bind variables from region 1. When this page is rendered region 1 renders properly however sql report region always returns no records. What am i missing here?
    I would like to have the region 2 render a report based on the values from region 1. Region 2 has a sql query that looks something like
    select
    colum 1,
    column 2,
    column 3
    from table t1
    where t1.c1 = :p10_item1
    and t1.c2 = :p10_item2Using apex 4.0
    thanks
    Seetharaman

    If these items hidden, try making them display only .
    Also what happens when you move the items from region 1 to region 2.
    From my experience items do not have much of a dependency on the region they are attached to other than cases when the region is not rendered(when its condition fails) and then the item values become null(bcoz they themselves are not rendered).

  • Report with page items

    Hello all,
    I am using APEX 4.0.3 and I would like to create a report where I could have editable page items within it. My objective was having for instance a variable number with its characteristics displayed in the report and the in one column be able to choose one second from a select list to associate to the first one.
    In resume I need to have both a select list in the report, and I need to know how do I access the value of this item in each of this rows.
    Thank you,
    Mike

    You need to loop.
    Check out "Referencing Arrays,Referencing Values Within an On Submit Process" sections in following documentation.
    This should give you fair idea.
    http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_app.htm
    For example if you have report with following query
    SELECT APEX_ITEM.TEXT(1,column_name) FROM myTable;
    and if you have 10 rows in table, then 10 text items will display on your page.
    Since we have given the ID (p_idx) as 1, we can refer these text items using G_F01 global array. (If its 2 then G_F02 etc. we can have upto 50 dynamic item on one page)
    G_F01.COUNT gives us "number of items"
    G_F01(i) gives us value of i ^th^ text item value.
    Hope it helps
    Regards,
    Hari

  • Refresh SQL Report Apex 4

    Hello everyone,
    On one of my pages i have 2 reports. An interactive Report and a SQL Report.(APEX 4.0)
    I don't know why Apex doesn't support 2 Interactive Reports on the same page.
    I need to refresh this reports on certain moments.Using a Dynamic Action i managed to refresh the Interactive Report, but not the SQL Report.
    I notice that in the SQL Report i have no "Enable Partial Page Refresh" checkbox...Is there any way to refresh a SQL Report via Dynamic Actions ?
    Thank you!
    Kind Regards,
    Cearnau Dan

    Hi Cearnau,
    Try this:
    Report Footer:
    &lt;script type="text/javascript">
        // Set report id
        $s('P1_REPORT_ID','#REGION_STATIC_ID#'.substr(1));
        // old version
        // $x('P1_REPORT_ID').value = '#REGION_STATIC_ID#'.substr(1);
    &lt;/script>
    HTML Header:
    &lt;script type="text/javascript">
    function fnc_updateReport(){
        // Report refresh
       $a_report($x('P1_REPORT_ID').value,'1','10','100');
    &lt;/script>Of course updating the Report with a dynamic action would work as well! :)
    Edited by: Tobias Arnhold on Oct 18, 2010 4:47 PM

  • Very intermittent missing page regions / report rows / page item values

    My goals in making this posting are twofold:
    1. I'm looking to see if anyone else has experienced this type of issue before.
    2. I'm looking for ideas about what can be done to debug such an infrequent bug with serious implications.
    Synopsis
    I'm having a weird problem where very infrequently I will load a page and I'll notice that one or more page regions, report rows, or page item values are missing. If I reload the page the missing parts appear as they normally should.
    By "very infrequently" I would say it happens to me somewhere between 1 in 100 and 1 in 1000 page loads, of course at my last project demonstration in happened twice in 10 minutes to my demo participants. I've attempted to debug this, but most of the techniques I know of involve reloading the page or reposting the form data and (of course) everything looks fine then.
    Environment
    * This has happened on multiple different pages, under ApEx 3.1 (Linux) and 3.2 (Solaris).
    * I believe that so far I've only ever seen this under Firefox 3/3.5 under OSX, but since I do the vast majority of my development with this browser it's not reasonable to conclude that it only happens under Firefox.
    Logs
    * No application errors during this timeframe.
    * Nothing of significance in the database alerts log (just thread notes and log sequences).
    * Nothing of significance in the webserver log (just the usual mod_ossl connection errors).
    Thanks for your attention,
    Jason
    Edited by: Jason G on Jul 24, 2009 12:43 PM

    Well, thanks for reading the post anyway.
    While working through some debugging steps I realized that I was populating some of the regions as the page rendered using AJAX -- this would pause the page rendering until the AJAX request returned. I believe that a hanging AJAX call was the likely culprit of the very intermittent symptoms I was seeing.
    I moved the AJAX calls to the last region of the page and added a javascript function that "watches the page load" by checking for regions by ID and looking at javascript boolean flags to let me know when the page is fully rendered. If this process takes longer than 5 seconds it notifies the user that something happened and offers to reload the page for them in an effort to fix the issue.
    So far, so good -- but it will take a lot of testing to convince me that this case is solved. I hope my documenting this is helpful for others in similar situations.
    Good luck,
    Jason

  • Copy value from report to page item

    Hi all,
    Does anyone knows how to copy an item value from a report to a page item, each time the report runs??
    thanks

    Hi,
    Take a look at this thread. column link - call java script & assign current report column value to item
    Regards,

  • Using SQL Query for page item source does not insert populated value

    Hi All,
    Following are the attribute details of a certain page item on an edit form:
    Display As: Text Field
    Page Item Source Type: SQL Query
    Source value Expression: SELECT a from tab where id = 'ABC'
    Although the field appears populated on the screen, but the value is not inserted in the table.
    Can anyone help on this?
    Thanks in advance,
    Annie

    Annie:
    One solution is to define a pl/sql function that given a date will return the 'run-date'. Something like create or replace function get_prod_date(p_date in date) return date is
    retval date;
    begin
    select run_date into retval from tab_x where run_date=p_date;
    return retval;
    end;Change the Source Type for the page-item back to 'Database Column'
    Set Source value or expression to the 'database column name'
    Set 'Post calculation computation' to be
    get_prod_date(:pxx_date)
    Varad

  • Layout issue: sql report region and items derived from a different table

    Hi all,
    I have a report region whose source is a sql query. I am trying to display other items in the same region(These I added manually on the page and they come from another table in the schema). It works fine, except the items that I added manually in the region always appear at the top of the items that are derived from the query. I want the other way around if possible, where I want the items from report query to appear first and then the other items to appear below them. Can this be done? If so how?
    Thanks in advance
    sr

    sr,
    on the definition page of your region, set the property "Display Point" to "Page Template Body (1. items below region content).
    I think that's what you are looking for.
    Patrick
    *** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

  • Refresh detail report when page is changed

    Hi All,
    could You help me with this problem, please?
    I have page with two reports on one page - master and detail. Master report has link column which ‘call’ the same page and fill item (P2_id) and it refresh the detail report. The problem is when I am changing the page (next x records), then is not item P2_ID changed and detail shows me data of the record from previous page :-(
    Idea is – when will page change than will ID from the first row of report copy into P2_ID... I thing there will any easy trick to solve this but I can find out it...
    Please should You help me
    Thanks a lot
    Alexej

    Alexej,
    The hard thing about what you want to do would be to populate the value of P2_ID on load. There's probably a way to do it but it would take some thought. The easy approach is simply to clear out the value of P2_ID on load and let the user select the row they want again. To get that to work the first thing you'll need to do is to disable the partial page rendering for this report's pagination as there is currently no way to handle these events well (I've done that). Next you'll need to have a process that clears out the value at the right time (I added a computation with a request condition).
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur

  • Version 3.1 fault - ORA-06502 error when creating SQL Report Region/Page

    I usually perfect my query in SQL*PLUS before I create a new report region.
    Consequently, I copy the code into the region wizard to create the new page. However, since we have upgraded to Version 3.1, virtually every report I have tried to create has created the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    It would appear that a maximum of 960 characters can be used to create the region/page. Perversely, once the page/region has been created, I can then edit the source and include as much code as I want (so far I've not run up against a limit)
    As it's just annoying, but not stopping me doing what I wanted to do, I've not got around to mentioning this error previously, but it occurred to me that I should (so I am!)
    David

    Hi David,
    Thank you for reporting this. Unfortunately, this was a regression introduced in Application Express 3.1. The workaround is to edit the region, as you suggested. This has been filed as Bug 6956070 and will be corrected in the forthcoming Application Express 3.1.1 patch set.
    Joel

  • SQL Report ref. Item Groups

    Hi Experts
    I have a User Defined Field on the face of all Sales Invoices which records the date a Maintenance Contract expires (manually entered by User). All my Maintenance Contracts belong to item groups beginning with "MAIN..."
    I want to be able to identify those Invoices raised, where the UDF (u_expiry) has not been populated. My attempt below is giving me invoices which has no product belonging item group begining with Main.
    SELECT T2.[DocNum], T2.[CardCode], T2.[CardName]
    FROM [dbo].[OITM]  T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod, OINV T2
    WHERE T1.[ItmsGrpNam] Like '%%MAIN%%' AND  T2.[U_Expiry] IS NULL
    Thanking you in advance.
    Derek

    Hi
    Find the below Query i think this will solve ur problem
    SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T1.[ItemCode],
    T1.[Dscription], T1.[Quantity], T0.[DocTotal], T3.[ItmsGrpNam]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN
    OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    WHERE T3.[ItmsGrpNam] ='Main' AND T0.[U_Expiry] IS NULL
    cheers
    Jenny

  • Viewer slow while retrieving data while changing value from a page item

    Hi, I am using 9.0.2 to create reports. My end-users are using Viewer to run these reports. Recently, we are experiencing performance problems with Viewer. We have reports with Page Item. Let say a report takes 1 min to run. After running the report if a different value is selected for a page item, it is takes another 1 min to get new data. Whereas, Desktop is not taking any additional time (noticable) for a different value for the page item. Recently, we are experiencing this problem. I thought that it was cache problem in Application server, so we restarted all the pieces in aps server. However, the problem still exists. We are using a materialized for this particular report.
    Any tips would be highly appreciated. Thanks.

    The performance differences can be attributed to the differences in product. Desktop is a client server product. A query executes and ALL data is returned to the desktop. You can manipulate that data in any way and the database is not required. Web (Plus/Viewer) only return the data needed to satisfy the query currently being viewed. If you change a page item, a database call is made to retreive additional/different data.
    In other words this is just how things work. You can alter settings in your prefs.txt file to improve performance in Viewer/Plus. Changing number of rows returned, memory settings, row fetch limits, rows per fetch all can improve/reduce performance.
    As best I know there is not a "magic" setting for these values. It is based on the server/volume of data/workbook content/ workbook layout. etc. Crosstab workbooks are much slower to return data than page -detail.

Maybe you are looking for

  • Oracle Text Search

    Hi, We have implemented Oracle Text Search in our Desktop application. Now it is searching in files available at Oracle Server system only. How we can implement the search feature with following: *1. Search files available at Mapped Drive or Netwrok

  • Errors in webview report, ccm 4.1(2) ipcce 6.0

    Hi all sometimes report shows abandoned calls with the same duration 5 min 14 sec the caller hears prompt then a single beep and then silence then the caller rings again and after prompt the agent answers the call normally ccm 4.1(2) ipcce 6.0 see en

  • Missed feature after Belle update

    After update my N8 to Belle i miss the homescreen feature Widgets offline in the options. In Symbian Anne was that a good feature to go offline in a other country. What way can i use to set the widgets in an offline mode?

  • "The previous performance of overclocking is failed"

    "The previous performance of overclocking is failed" I get this error almost everytime i turn off or restart my computer. Thats after I restart my computer 5 times because all I have is a black screen. I read about it and I have to restart that many

  • Help me configure my PC to develop JSP ??

    Hi all .. iam an ASP developer and i decided to move to JSP development .. but i dont know how to configure my PC to run the JSP pages and where is the best editor to use .. if there are some one can tell me i will apreciate it alot .. i have downloa