Referencing application item in report query

I can't seem to find documentation on how to do this. I have defined an application item in shared components called APP_LOCATION. I need to reference this item in a report query where clause. This is an sql report, not an interactive report. I have tried:
select .....
from ..
where x.column=:APP_LOCATION
but this does not work. Can someone help or point me to some documentation on this?

I found the answer to my own question. The query syntax was correct, but I was not setting the value of the application item.

Similar Messages

  • Populating application item when updateable query report item is changed

    I have been looking at the help for cascading LOVs posted here. Unfortunately, I am not able to get it to work, and so am backing up with baby steps.
    I have a sql updateable report. It has a column (IN_STATE) that is a LOV sql query that pulls up a list of states. When a state is selected, I want the value to be placed in the application item, TEMPORARY ITEM. because I have copied the logic, it may actually be more complicated that needed at this point...happy to cut things out if need be.
    The updateabale report item, IN_STATE has the element attribute of:
    onchange="get_ajax_select_xml(this);"
    The region has an html header of:
    <script type="text/javascript">
    function appendToSelect(pSelect, pValue, pContent)
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    else {     
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    var g_area=new Object;
    var g_sub_area=new Object;
    function replace_select_list(pSelect,pXML)
    var l_Count = pXML.getElementsByTagName("option").length;
    pSelect.length = 0;
    for(var j=0;i<l_Count;j++){
    var l_Opt_Xml = pXML.getElementsByTagName("option")[j];
    appendToSelect(pSelect, l_Opt_Xml.getAttribute('value'),l_Opt_Xml.firstChild.nodeValue)
    function get_ajax_select_xml(pThis)
    var l_Return = null;
    var l_td=html_CascadeUpTill(pThis,'TD');
    var l_area=l_td.nextSibling.getElementsByTagName('select')[0];
    var l_sub_area=l_td.nextSibling.nextSibling.getElementsByTagName('select')[0];
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=get_area_code',html_GetElement('pFlowStepId').value);
    get.add('TEMPORARY_ITEM',pThis.value);
    gReturn = get.get('XML');
    </script>GET_AREA_CODE and GET_SUB_AREA_CODE are application processes.
    At this stage, I am just trying to polutate TEMPORARY_ITEM when IN_STATE is changed.
    Any hints are appreciated. thanks

    If you are working with APEX then you are posting on the wrong forum. This is the JDeveloper forum - try this instead:
    Oracle Application Express (APEX)

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

  • Saved PDF from Stored Procedure missing application item in report header

    I am able to create and save the pdf from a stored procedure however the application item that contains the date is blank in the saved pdf. Report title displays correctly when running via APEX. I have tried to set this value with, apex_util.set_session_state('F111_DATE',sysdate); and also as a cookie owa_cookie.send('F11_DATE',to_char(sysdate,'Month DD, YYYY'));
    and neither of these statements work. Example of code below...
    vRequest := Utl_Http.begin_request(vReportUrl,'POST');
    Utl_Http.set_header(vRequest, 'User-Agent', 'Mozilla/4.0');
    owa_cookie.send('F11_DATE',to_char(sysdate,'Month DD, YYYY'));
    apex_util.set_session_state('F111_DATE',sysdate);
    vResponse := Utl_Http.get_response(vRequest);
    Apex version 3.2/ 11g

    There are also some great resources on OTN:
    How-To's: http://www.oracle.com/technology/products/database/application_express/howtos/howtos.html
    Tips and Tricks:
    http://htmldb.oracle.com/pls/otn/f?p=18326:50:3390956087894876
    And check out Scott Spendolini & Carls Blog:
    http://spendolini.blogspot.com/
    http://blogs.oracle.com/carlback/
    These are all great resources for picking up some really cool stuff.
    Regards
    Duncan

  • Item aging report query

    Hi All,
    My Client need Item aging report but by default there is no item aging report is there in SBO or any idea to create the report
    Pls any one can give me the complete item aging query.
    Thanks,
    Gopal

    hi gopal,
    Pl check this links
    https://forums.sdn.sap.com/watches!add.jspa?forumID=264&threadID=871918
    https://forums.sdn.sap.com/watches!add.jspa?forumID=264&threadID=974984
    Jeyakanthan

  • Report Query with Bind variables working very slowly

    Hi everyone,
    I'm having a hard time with one of my Reports.
    Basically the query looks like this:
    Select *
    from x,y,z
    where x.lang_id = :P1_LANG
    and y.name = :P1_LANG;
    I have a textfield and a Select List on my Page which have to have a value before the report is shown.
    Now to the problem, when I input a value into these Application Items the Report takes ages (3-5 min). But when I replace the Bind variables (:P1_LANG and :P1_LANG) with the actual values it takes mere seconds.
    Anyone got an idea why this might be?
    I'm at my wits end -.-
    Edited by: DocD on Oct 27, 2009 3:01 AM

    Hi
    This could be for a number of reasons and unfortunately there is no quick answer...
    When you run a query for the first time, the execution plan is worked out by the Cost Based Optimiser (I'm assuming you're using 10g or above here). This is referred to as a hard parse. Next time the same SQL text is used then the execution plan may still be in the shared pool - in this case the same execution plan is used rather than being calculated again.
    The great thing about using bind variables is that even with different inputs, the SQL text is the same so the execution plan can be shared for different inputs. One downside is that if the first time the query is executed using bind variables, out of the ordinary values are input, bind variable peeking can lead to a sub optimal execution plan being calculated for the query and then shared in other situations (where more 'normal' values are input).
    However, it could be down to a host of other things too. So your first check is to make sure that you have executed both queries a number of times. If you are still getting the same performance issues then plan post the full query, table creation scripts and execution plan for both querys.
    Cheers
    Ben

  • Enhancement Req (v4.0): Report Query- Output Format- Derive from Item

    Brief Introduction
    I have 1 major request I would like to make (and 2 lesser ones). The first, I would like to specify custom available output formats for 'Report Query' objects, as well as Reports Regions, Interactive Reports, etc. I believe that this could easily be an instance setting in the Report Server region of the internal workspace, or per workspace / application. Even if not supported on the system wide level, I would recommend that the "Derived from Item" output format "Return Value" be allowed to be returned unaltered to the Report Server. I know that the type is returned as "_xf", and for my purposes I would REALLY like to be able to get something other than the defaults.
    Use Case
    I am creating a custom JasperReports integration (for which I will be launching a public SaaS beta extremely soon). It uses the standard Apex reporting objects (Queries, Layouts, Print Buttons, etc). JasperReports templates are uploaded as Report Layouts and everything works fine. I am, however, wanting to implement as many output formats as are available to me in Jasper...that means Word 07, Excel 07, ODS, ODT, etc. For the items that take a print server override I can handle this in other ways (even though this appears broken [see below]), but for the standard report queries this isn't available. I would basically like the option to define the set of available output formats for the report server, and what the "_xf" returned for each one is.
    Minor Requests
    - Replace Uploaded Templates: If a template is used often and updated, then it has to be changed everywhere...minor irritation.
    - Customize Report Server URL for the Workspace or Application: For SaaS instances, workspace developers may license or have access to reporting solutions that are not (and should not be) available to all of the Oracle instance's workspaces, or may conflict with a service that is already provided by the instance administrators.
    Broken
    When I use the print server override, with the "Use Headers From" option, it appears that neither my content type, nor my content disposition headers are being sent back to the client. This is the work around solution for the non-standard types issue I am requesting enhancement on, so I would like to know what I can do to get this working immediately.
    Additional Info
    As it stands, if the site is available, feel free to sign up for the beta. The beta keys will be exported soon to the instance and made available. Instructions on setup will also follow:
    https://apex.vendelinc.com/apex/f?p=home

    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

  • Need to create report query to get latest open and last closed period for given application

    Hi All,
    I need to create a report query to get below result displayed in report output.
    1)   -   Application name
    2)   -    Ledger name
    -o/  -Operating Unit
    3)   -  Last Closed Period
    4)   -  Current Open Period
    5)   -  Date Closed – Last Closed Period
    6)   -  Date Open – Current Open Period
    I tr I tried to create the query below is the same. Please let me know if it looks fine.
    SELECT *
      FROM (SELECT fav.application_name ,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status ='C'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
    UNION ALL
    SELECT *
      FROM (SELECT fav.application_name Application_Name,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status = 'O'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc)
             WHERE ROWNUM = 1

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • SQL Report query with condition (multiple parameters) in apex item?

    Hello all,
    I have a little problem and can't find a solution.
    I need to create reports based on a SQL query or I.R. Nothing hard there.
    Then I need to add the WHERE clause dynamically with javascript from an Apex item.
    Again not very hard. I defined an Apex item, set my query like this "SELECT * FROM MYTAB WHERE COL1 = :P1_SEARCH" and then I call the page setting the P1_SEARCH value. For instance COL1 is rowid. It works fine.
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.
    How could I do that, please?
    Thanks for your help.
    Max

    mnoscars wrote:
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.For a standard report, see +{message:id=9609120}+
    For an IR&mdash;and improved security avoiding the risk of SQL Injection&mdash;use a <a href="http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm#CACFAICJ">collection</a> containing the values in a column instead of a CSV list:
    {code}
    SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = 'P1_SEARCH')
    {code}
    (Please close duplicate threads spawned by your original question.)

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • How To Use a Hidden Page Item within an SQL Report Query without Submitting

    Hi,
    Using: Oracle ApEx 3.0.1
    I have an sql report region that contains a hidden page item as part of the "where clause". My problem is, based on a value entered by the user, I need to assign this value enetered to my hidden item, so that it can be used within the where condition of my sql but this would need to be done without actually submitting the form.
    At the moment, I can set the value via an on-demand process but my SQL is still not returing any values as the hidden page item within the query is not set (as page has not been submitted).
    Can anybody please assist as I am not sure how to do this and whether in actual fact, this is possible to do, without having submitted the page.
    Thanks.
    Tony.
    Edited by: Tony F. on Nov 12, 2011 1:39 AM

    You can set a session value using a dummy ajax call e.g:
    Add the following to the 'Function and Global Variable Declaration' region
    function f_set_item(pThis){
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',1);
      get.add('P1_ID',pThis.value)
      gReturn = get.get();
      get = null;
    }Where P1_ID is the session value to be set. Then call the function in the usual way e.g.
    javascript:f_set_item(this);
    I hope that helps
    Shunt

  • Query in Item Reservations Report

    Hi all,
    Can i know what the 'Remaining Quantity' in the Item Reservations Report mean.Also let me know when the same column will be affected and how.
    ie.When can reserved quantities and remaining quantities vary in the report?
    Regards,
    Bala.

    You may use the set_block_property procedure built-in and the 'default_where' property so as to execute the query using the contents of your item (with the name of column , of course).
    Afterwards , you navigate to the db items block (with go_block('blockname')) and execute the query (built-in 'execute_query').
    Hope it helps
    Sim

  • A/R invoice Report Query selection by Items.

    Dear All,
    I need a A/R invoice  Report Query selection by Items.
    Thanx in advance!!!!!!!!

    Hi,
            Try this......
    Declare @Itemcode nvarchar(50)
    set @Itemcode = (select (T1.iTEMCODE) FROM INV1 T1 WHERE T1.ITEMCODE='[%0]')
    SELECT T0.DocNum, T0.DocStatus, T0.DocDate as 'Posting date',
    T0.TaxDate as 'Document Date', T0.CardCode as 'Customer Code',
    T0.CardName as 'Customer Name', T1.ItemCode, T1.Dscription as 'Item Name',
    T1.Quantity,T1.Price,T1.VatSum AS TAX,T1.LineTotal as Total
    FROM OINV T0
    INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    where T1.ItemCode =@Itemcode 

  • Items in project report(query) are listed under the "not assigned" (column)

    Hi All,
    Items in project reports (query) are listed under the "not assigned" (column name) Why it is so ?
    Start query : project reports & ask for period April 2008 (Period from/to). .
    You will see items listed under  Not assigned WBS Element (column name)
    If you choose for a period of April until June 2008 then you see more items under u201Cnot assignedu201D .
    Items should be under Assigned (column name) & not under the Not assigned (column name )
    Any suggestions highly appreciable.
    Thanks.

    Hi,
    How are you displaying the ITEM field in the BEx query designer? Is it displayed with "Key and Text"? If so and if the text is not loaded for this master, this may happen.
    Regards,
    Yogesh.

  • Returning a value from a query into an application item

    Hi,
    I have a insert statement defined in a process which I require that after inserting some data (from which the primary key is fetched from a sequence within a trigger on the table ra_assessments) that this key is then returned into the application item :GBL_CURRENT_ASSESSMENT. The code I have attempted to use is:
    begin
    insert into ra_assessments values(
    NULL,
    --rest of the fields here ) RETURNING id INTO :GBL_CURRENT_ASSESSMENT;
    end;
    Now, this works fine if I want to return into a page level item (say :P2_ID) however it does not appear to return correctly into an application item. The application item is unrestricted.
    Any help/suggestions would be very much appreciated.
    Thanks

    hi,
    There is nothing polpulating :P2_ID - I created the page item as a test instead of populating :GBL_CURRENT_ASSESSMENT. So, I then changed the code above to read:
    begin
    insert into ra_assessments values(
    NULL,
    --rest of the fields here ) RETURNING id INTO :P2_ID;
    end;
    which successfully populates :P2_ID with a value. It will not however populate :GBL_CURRENT_ASSESSMENT when I use that in the place of :P2_ID in the example above.
    I hope this makes sense! :)
    cheers,
    Message was edited by:
    /dev/null
    -Bad sppeling! :-Þ

Maybe you are looking for

  • IPhoto 6 unusably slow (starting with keywords and then the rest o product)

    As I've mentioned in a post in another thread, I upgraded to iPhoto 6 a few weeks ago. From the moment of upgrade, anything associated with the keyword function (applying, searching, even scrolling the keyword box) is painfully slow--60 seconds to 3+

  • Has anyone solved the problem with " lagging " response when opening nay app ?

    since " upgrading " ( if you can call it that ! ) to IOS7 on iPhone 4, everyone is complaining about the delay when opening any App. At the Genius bar at Apple store they referred to this as " lagging ". After a quick diagnostic of my phone, they sug

  • Mobile: Web Service data control doesn't refresh data when revisiting page

    Hi all, I have an ADF Mobile AMX page which shows data returned by a Web Service. The page is pretty simple and contains a listView which iteraters over my WS Data Control's binding, as well as some GUI components to make it possible to use amx:listV

  • Desktop app store app shows old priced apps

    App store app vs 1.0.2 shows older release date for a specific app with older higher price, where iTunes store has newer vs at lower price! Why doesn't desktop app store app reflect same newest vs's that iTunes does? I checked software updates and th

  • Error in posting purchase order delivery

    Hi I got an error while posting purchase order delivery through Tcode- MIGO This is the Error Message: Posting only possible in 2009/04 and 2009/03 in company code XXXX I checked everything Fiscal year variant,Posting period variant,etc. And in Tcode