Update report based on selected LOV value

I've searched the forum but could not find the answer how to implement the following:
I have a form with a popup LOV, element P203_LOCATION_ID, which is populated from a query. When the user picks a value from it, a report in the same page should be refreshed. The report has query "select * from distances where d < 1 AND l = :P203_LOCATION_ID " .
I created a dynamic action which would refresh the report on change of P203_LOCATION_ID , but the report does not change.
After looking here, I made a hidden variable P203_SEL_LOCATION which is populated by dynamic action on change, with javascript $v('P203_LOCATION_ID') , and then a second rule in the dynamic action should refresh the report. The query in the report is changed to use :P203_SEL_LOCATION as a parameter.
Although, when made display-only, P203_SEL_LOCATION does change (and console.log shows the selected ID), the report does not see that change and remains empty. I tried both IR and classic report, same result.
Any help would be appreciated, how to make change in Items visible to the report?

Hi Mila,
I assume that you have checked that the report refresh process is happening and that by "empty" you meant that the report was not fetching any records whereas it should have for the value you see in the page.
It could be because the changed values is not is not yet set in the session for the report to see(report fetches the bind value of the item P203_SEL_LOCATION from the session).
You will need to add the item's value to the session before firing the report refresh.
One way to do that would be to add a PLSQL process as true action with the sequence order lesser than the refresh.
In the items to submit_ , give P203_SEL_LOCATION
And the process needn't do anything(what we wanted was the P203_SEL_LOCATION be set, which would be done before executing this PLSQL)
BEGIN
NULL;
END;Hope that solves your problem

Similar Messages

  • Refresh classic report based on select list value selected

    hello,
    can anyone please help me out with this issue. I have a parameterized classic report based on a select list and I want to refresh this report whenever the select list value is changed. I am using oracle apex version 3.2. i just want to have a javascript function onchange event for the select list which refreshes my report whenever a value is selected.
    My select list item is p1_datastore
    select distinct datastore d,datastore r from my_table1 order by 1;
    My classic report query is
    select * from my_table2 where datastore = :p1_datastore order by last_updated_dt desc;
    ****************************************************thanks,
    orton

    can anyone please help me out with this issue.
    thanks,
    orton

  • Creating a Dynamic Update Statement based on Select

    hi,
    i'm trying to create a dynamic update statement based on select statement
    my requirment is to query a joint tables and get the results then based on the results i need to copy all the data and create an update statement for each row
    for ex
    the update statement should look like this
    update iadvyy set SO_SWEEP_CNT = '1' where inst_no = '003' and memb_cust_no = 'aaaaaaaaaaaaaaaa';
    and the select statement like the following
    select substr(key_1,11,9) account_no,sord_mast SO_SWEEP_CNT from
    select acct_no,count(*) sord_mast from
    (select from_acct_no acct_no,update_mast
    from sord where FROM_SYS in ('DEP','INV') and TERM_DATE > 40460
    union all
    select to_acct_no acct_no,update_mast
    from sord where TO_SYS in ('DEP','INV') and TERM_DATE > 40460)
    group by Acct_no)
    right outer join
    invm
    on
    key_1 = '003'||acct_no
    where sord_mast > 0;
    so taking the above two columns from the above select statement and substitue the values as separate update statement.
    is that doable , please share your knowledge with me if poosible
    thanks in advanced

    is that doable , please share your knowledge with me if poosibleyes
    The standard advice when (ab)using EXECUTE IMMEDIATE is to compose the SQL statement in a single VARCHAR2 variable
    Then print the SQL before passing it to EXECUTE IMMEDIATE.
    COPY the statement & PASTE into sqlplus to validate its correctness.

  • Selected Lov Value as Parameter to Concurrent Program in oaf

    Hi,
    iam new to OAF ,Can any one please help me how to pass selected lov value as a parameter to the Concurrent program in oaf.
    i created one lov in oaf page after selecting value in lov i want that value to be passed as parameter to concurrent program.
    Please help me how to implemet code so that Lov will pass as parameter to the concurent program in Controller.

    Check these links. You need to get the value from the LOV to a variable, add it to the vector and pass to the conc program. Below link provides the details on concurrent program submission.
    http://prasanna-adf.blogspot.com/2008/11/call-concurrent-program-from-oa.html
    For fetching LOV values, check the Dev Guide
    Thanks
    Shree

  • Filtering an EVDRE report based on a Data Value

    Everyone,
    I have a report that has accounts in the columns without expansion. I am capturing various status codes in one account and I need to know how to filter the report based on a data value that is retrieved from the database for this account.I am also using the EVdre sort functionality along with an EVSUB in the after range which  sub totals the Organization and Materials Dimensions in the rows.  When I try to use native Excel to filter  based on the value of the Status Code Account  the report will only sort the top section of the report. As soon as it hits the Subtotals it stops filtering. Is there a way to filter the report in EVDRE based on the data value that is returned from the database.
    The account that I want to filter on is Status Code. We can have two values in it either 10 = Submitted or 30 = Business Case. The users want to be able to filter the report to only show the status code of 10 (Submitted) for their Executives to review.
    Edited by: eleasha counts on Aug 3, 2011 12:22 PM

    Hi eleasha,
    I don't know if you will entertain FORMATRANGE.
    But you can use formatrange to hide those rows you donot want to see.
    You can use the CRITERIA as VALUE=<<anyvalue>> you want to verify and apply it on rows.
    You can set the PARAMETER value as ROWHEIGHT=0, and apply to ALL.
    Try this with the combinations you need to see.
    Hope this helps.
    Karthik AJ

  • Data Selection for report based upon a 'Prompt Value'

    I want to report information in my report based upon a 'user input prompt value'
    for example:
    'Enter Shareholder Selection - A-Active, I-Inactive, B-Both Active and Inactive'
    if the user enters 'A', the report selects only active shareholders
    if the user enters 'I', the report selects only inactive shareholders
    if the user enters 'B' the report selects all shareholders, active and inactive
    the field in the database that this based upon is their total share value.
    if this field is greater than zero (>0) they are considerd 'active'
    if this field is equal to zero (=0) they are considered 'inactive'.
    I have tried creating some type of filter,  but am not having any luck. 
    I saw a few examples within the forums that I have tried without any luck....unfortunately most of the examples I've seen are base one only two choices.
    I'm sure I need to create some type of 'independant varible' but am not sure how to do that either.
    Any suggestions would be appreciated.
    Thanks.

    Hi Daryl,
    I Tried this unsuccessfully in DESKI . We can't Eliminate Rows having Empty Measure Values or Measure with 0 as values using Table Level Filter as FIlter can't FIlter rows based on Prompt value selection dynamically. Filters filter rows at a time and not based on 3 condition as Active, Inactive and Both. thus filters are of no use.
    I Tried this in WEBI, and it is working perfectly you donu2019t have to create any Object in Universe, you can do it using function UserResponse() at report level.
    Hence if you are comfortable using WEBI for Generating this report then Follow the steps.
    1. Create Report With Name and Shares Object. It will display all Shareholder Names and No.of shares they hold.
    2. Use Status Object in Query filter, use condition as u201CEqual Tou201D and Select prompt. It  contains Active, Inactive and Both as values.
    3. Report will Display all Shareholder names and No. of  shares  like 45, 789, 0, 4562 where 0 is inactive Shareholder and all other are active shareholder.
    4. Create Variable using Formula.
    =If(UserResponse("Enter Status:")="Active" And [Shares]>0;[Shares];If(UserResponse("Enter Status:")="Inactive" And [Shares]<=0;[Shares];If(UserResponse("Enter Status:")="Both";[Shares])))
    5. Remove Shares Object from the report and Put Variable created with Names of Shareholders.
    6. Select Table-> Properties-> Display-> Uncheck the Option u201CShow Rows with Empty Measure Valuesu201D
    7. Report will display Value correctly as per your Prompt value selection.
    I Hope this Helpsu2026
    Thanksu2026
    Pratik

  • A Date prompt defaulting the data in Report based on selection

    Gurus,
    I have a requirement , where i have a (in between) date prompt set in the dashboard current defulting to Start Month date and End Month date of current month.
    What the user want is based on the selection using a drop down in dashboard which has got values Last Day, Last week, Last Month , the default values in Date filter should change in dashboard.
    For Eg. If the user select Last Week, the in between date filter show the default date value as Last Week Mon and Last Sun, and should filter out the report based on that.
    Any idea's are welcome....
    Thanks & Regards
    -Saurabh

    Try to see if you can get user to agree on something easier.
    Here are the steps to achieve what you want.
    1. Create a prompt for 1 day, 2 week, and 3 month
    2. Create three separate reports based on above selection, which has page prompt for day/week/month respectively.
    3. Create GN based on step in 1 and then let UI change between three reports you created in step 2
    I hope this helps,
    Best luck

  • Getting error while selecting LOV value

    Hi all,
    I am getting the below error in R12 apps while selecting the lov value from list (But it is working properly in 11i apps and loacal jdeveloper.)
    Error: Stale Data
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example).
    Cause:
    The view object ProjectInformationAM.EmployeeLOVVO1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    The lov query is select employee_number,full_name from per_all_people_f
    I have tried both internal and external lov but both cases it is showing the error in R12
    I have used below code in PR of create page, still no use
    if(!am.getEmployeelovVO1().isPreparedForExecution())
    am.getEmployeelovVO1().executeQuery();
    Row row1 = am.getEmployeelovVO1().createRow();
    am.getEmployeelovVO1().insertRow(row1);
    row1.setNewRowState(Row.STATUS_INITIALIZED);
    Except this lov all lov's working properly,
    Any one help on this it is very very urgent....
    Thanks

    Hi,
    I had a similar issue just now, and we fixed it in this way. But the case is probably different compared to your situation.
    Situation:
    - custom inquiry page
    - case: manual search, so not results based or Auto Customization Criteria
    - multiple search criteria fields
    - separate AM for all the LOV fields
    - each LOV has its own VO
    - Results table on same page, but with its own VO
    - each search criteria field has Lov mapping to the corresponding external Lov region
    Issue: when selecting a value via the Lov and coming back into the search page, I received the stale data error.
    searched lots of places and finally figured out what was wrong in my case.
    Each search field had its BC4J properties set to the VO of the results table. And since we wanted to make a manual search thing, this is not good.
    Removing the View Instance value and the View Attribute value in the properties of the search fields resolved the error.
    Hoperfully this can help other beginners, like me, in finding a solution for the same mistakes... :)
    regards
    Ronny

  • Generate Report based on Select List

    Hi ,
    I have a drop down list those are the column names and a corresponding value i will enter in input text . so based on these two values how can i generate a report in Apex i am using apex 4.0.2.
    Means in where clause dropdown value will become column name and input text will become value for that column;
    Thanks
    Raghav

    This gets complicated really fast.
    I'd use an Interactive Report.
    select * from emp
    where (:P5_COLUMN_NAME='deptno' and deptno= :P5_COLUMN_VALUE)
       or (:P5_COLUMN_NAME='ename' and ename= :P5_COLUMN_VALUE)

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Update header document with selected currency value in JSP

    Hi all,
    I have custom dropdown box for currency in checkout JSP page. 
    If I change currency selection in dropdown, how can I capture this value and update currency in header.
    Venkat

    Hello Venkat
    I am not sure if I got your actual query here.
    Where exactly have you placed your custom Drop-down field as of now?
    I guess, if you have a custom Drop-down field, you will also have its action-handlers.  Why cant you use the action handler for value selection or value change, and then pass the new currency value selected and trigger another update on the Order?
    Hope this helps.
    Regards, Vishal

  • Report based on selection criteria in an Apex collection

    For my current page I have to deal with a horrible "EAV" (Entity-Attribute-Value) table design like this:
    Employee ---< Attribute Value >-- Attribute
    So you might query who works in dept 10 and earns 20000 and was hired om 01-Jan-2007 like this:
    select emp.ename
    from emp
    join attribute_value a1 on a1.empno = emp.empno and a1.att_name = 'DEPT'
    join attribute_value a2 on a2.empno = emp.empno and a2.att_name = 'SALARY'
    join attribute_value a3 on a3.empno = emp.empno and a3.att_name = 'HIREDATE'
    where a1.att_numeric_value = 10
    and   a2.att_numeric_value = 20000
    and   a3.att_date_value = date '2007-01-01';(I said it was horrible!)
    But to make matters worse, the form for entering query criteria is also based on the attributes table as a tabular form:
    select apex_item.display_and_save(1,att_name) att_name
    ,      apex_item.text(2,null) att_value
    from   attributes
    where  att_type = 'EMPLOYEE';The user may enter values for any number of attributes and run the query. So in my example, there maybe be 0, 1, 2 or 3 criteria to use (or more when new attributes are added to the table).
    I can code the report query as a "PL/SQL body returning SQL query" and build a SQL string exactly like my example above - all literal values. Is there any way I could do it that uses bind variables? Given the variable number of bind variables I think I'd need to use DBMS_SQL, but would I be able to integrate that into an Apex report region source? Or is there another way?
    I'm open to any suggestions! (Except "redesign the database": much as I'd like to, I can't.)

    If you are sure of the number of attributes the user will be using as criteria is fixed and will not change, you should able to bind the literals to page items like:
    select emp.ename
    from emp
    join attribute_value a1 on a1.empno = emp.empno and a1.att_name = 'DEPT'
    join attribute_value a2 on a2.empno = emp.empno and a2.att_name = 'SALARY'
    join attribute_value a3 on a3.empno = emp.empno and a3.att_name = 'HIREDATE'
    where a1.att_numeric_value = :P1_dept_value
    and   a2.att_numeric_value = :P1_salary_value
    and   a3.att_date_value = to_date(:P1_hiredate_value,'YYYY-MM-DD');or
    select emp.ename
    from emp
    join attribute_value a1 on a1.empno = emp.empno and a1.att_name = :P1_att1_name
    join attribute_value a2 on a2.empno = emp.empno and a2.att_name = :P1_att2_name
    join attribute_value a3 on a3.empno = emp.empno and a3.att_name = :P1_att3_name
    where a1.att_numeric_value = :P1_att1_value
    and   a2.att_numeric_value = :P1_att2_value
    and   a3.att_date_value = to_date(:P1_att3_value,'DD-MM-DD');What happens when your user wants to add another attribute and use it as search criteria. You have to:
    1) add a JOIN clause to the SELECT
    2) add to the WHERE clause to the SELECT
    Warning personal opinion to follow: I would give up binding (i.e.. skipping parsing os the SELECT statement) for the flexibility of generating the SELECT at runtime. If the user adds a new attribute, then the PL/SQL code that assembles the SELECT statement would not have to be changed. All the meta data is stored in the database as to what the new column is and which column in the attributes table to use (ATT_NUMERIC_VALUE or ATT_DATE_VALUE). If your method of displaying the attributes and receiving the user's criteria is dynamic like my example, then you would not have to change the application at all for new attributes.
    Just my 2 cents worth of opinion,
    Mike

  • Help report based in colums lov

    Hi,
    I'm trying to create a report and create a filter for columns and the value of these column, it's something like that:
    P52_C1 (select list) return the name of the columns of the table.
    LOV:
    select column_name display_value, column_name return_value
    from all_tab_columns
    where table_name = 'table_name'
    order by 1
    P52_C2 (select list)
    LOV:
    select :P52_C1 display_value, :P52_C1 return_value
    from table_name
    order by 1
    In the item P52_C1 the query is working fine, but in the second item (P52_C2) query dont return the expected result, is returning the name of column a lot of times.
    Anyone have any idea.
    Thanks

    Hi,
    use
    select &P52_C1 display_value., &P52_C1 return_value.
    from table_name
    order by 1instead. But keep in mind that this opens up your application for SQL injections. Have a look at http://st-curriculum.oracle.com/tutorial/SQLInjection/index.htm to see how you can use DBMS_ASSERT on your dynamic columns to avoid SQL injection.
    Regards
    Patrick
    My blog: http://www.inside-oracle-apex.com/

  • Selected LOV value not reflected in Main page

    Hi
    Whenever I select an LOV and query for the values ,the values are displayed and when I select one of the values and click on "SELECT" button on LOV page the selected value is not reflected in Main page.
    Even if I enter an appropriate value in the LOV field and click on "NEXT" button in Main Page the value is not recognised and an error is thrown saying that the field can not be blank.
    Please help me.
    Thanks and regards

    Is there an underlying view attribute to the LOV Field? Is it updatable?

  • Set a text box value based on the LOV value

    Hi,
    I have an LOV that lists customer part numbers. When a user selects a customer part number from the LOV, I need to update the part quantity from a different table in a text box.
    I am not sure how to get this to work. If somebody can help me get this working, I would really appreciate it.
    Thank you
    Bhavesh

    look at http://forums.oracle.com/forums/message.jsp?id=936631&gid=469632
    likely they got the same problem.
    Hi,
    I have an LOV that lists customer part numbers. When a user selects a customer part number from the LOV, I need to update the part quantity from a different table in a text box.
    I am not sure how to get this to work. If somebody can help me get this working, I would really appreciate it.
    Thank you
    Bhavesh

Maybe you are looking for

  • Can no longer echo brightness after upgrading intel-dri and libgl

    I just upgraded these two packages for my Intel HD 3000: [2011-11-29 17:13] upgraded libgl (7.11.1-1 -> 7.11.2-1) [2011-11-29 17:13] upgraded intel-dri (7.11.1-1 -> 7.11.2-1) And afterwards this file into which I used to echo brigthness values has di

  • Workflow: create a document set and add default documents to it

      Having a workflow create a new document set seems straightforward: use the "create list item" action, choose the target library and one of the document set content types available in it and supply values for the fields. But that workflow action doe

  • BDC(va02) page down condition

    hi all! i done bdc for va02. In this when i press page down (=p+)only 9 line item will display  and again press page down next  9 line item will be shown .(in my pgm 11 line items showing) Is it possible to give a spacific conditio for page down ? ho

  • Problems with Flashpaper

    Hi all Tried to install Flashpaper 2 (trial) and while it says it's installed successfully I get the Flashprinter not installed msg, I have checked teh printer and teh port for flashprinter is checked , I have no icon or flashpaper access via MS Word

  • When will i get my emails!! Driving me crazy !!

    I can send emails but im receiveing nothing... and no update from apple to reassure me that things will be sorted soon. Please can you let us know when it will be sorted?