Multi-record report: content LOV depending on value of current row

I have a multi-record report based on a query.
For each row in the report it should be possible to choose a value from lov.
The content of the lov is depending on a field in the current row.
Later on I will update a record based on the chosen value but that is not the
issue right now.
The problem I am facing is that I don't know how to refer in a list to a value
from the current row.
For example.
In the example below it should be possible to choose (from the lov) a best buddy for
an employee. The buddy should be an other employee working for the same department.
So in the lov I must refer to the deptno from the current row. How is this possible???
select empno
, ename
, deptno
, htmldb_item.select_list_from_query
( 1
, empno
, 'select ename, empno from emp where deptno = #deptno# '
) buddy
from emp

Hi Scott,
I've created this application "TestLov" at the site you mentioned.
Application ID : 800
Workspace Name : ANUWKSPC
The first page has an employee report with the solution as suggested by Raju Mattamal in this thread. That query seems to work fine without any errors...(I'm surprised why I'm getting errors on my application with the same query, even though data appears?! Is it to do with some setting?)
The second page has the report with my actual query. This is throwing errors.
On the third page I've tried to implement the solution you've suggested in Tips & Tricks section of HTML DB Studio(Simulating a correlated sub-query in report LOVs)
http://htmldb.oracle.com/pls/otn/f?p=18326:54:2188928890822530056::::P54_ID:1282
This doesn't seem to work either.
I'm unable to figure out the problem.
Pls look into the application and let me know how I shld go abt this.
Thanks in advance,
Anu

Similar Messages

  • Set "current" or "active" record in multi-record Report or Form

    Im trying to use HTML DB for the following:
    Display a multi-record Report (or Form);
    Mark one of the displayed records as "active" or "current", saving its PK/UK or rowid into a variable/field;
    After that, select a function/process to be performed on or on the basis of this "active" record.
    This is very similar to what is possible in 10g Grid Control, when, for example, you dislay (Administration/Tables) a list of tables (in a schema),
    "select" one of the displayed tables, and then request, for example, to view the data in that table.
    The question is, how do I define/attach the "Select" field (single-valued radio) to each of the displayed record in my multi-record Report or Form ??

    Im trying to use HTML DB for the following:
    Display a multi-record Report (or Form);
    Mark one of the displayed records as "active" or "current", saving its PK/UK or rowid into a variable/field;
    After that, select a function/process to be performed on or on the basis of this "active" record.
    This is very similar to what is possible in 10g Grid Control, when, for example, you dislay (Administration/Tables) a list of tables (in a schema),
    "select" one of the displayed tables, and then request, for example, to view the data in that table.
    The question is, how do I define/attach the "Select" field (single-valued radio) to each of the displayed record in my multi-record Report or Form ??

  • LOV depending on value of field in report

    I have a report on a query. In one of the fields I want to have a Radio Group, Based on query based LOV. The values in the LOV depends on the value in the field in the report. Is this possible, and how do I define the LOV for it?
    Would it be something like:
    select disp_val d, id r
    from my_table
    where field_x = [value_of_this_field_in_my_report]
    order by 1What do I fill in for [value_of_this_field_in_my_report]?

    Please refer to Metalink note 825603.1.

  • Change Value in one LOV depending on value in another LOV

    hi forum.
    i have two Lov's. The first has continents and second has countries. my design is when user select continent, related countries should show up. now i can do that when i submit on the change of continent LOV very easily but, i dont want to refresh or reload the page as some other functions are disturbed by this, i want the countries values to change with out page being reloaded. please let me know how can i do it. i m a dumb ass so answers like "use dynamic action" or "user java script" are no different than ancient Greek to me. so plz reply elaborately as a matter of compassion.
    thanks in advance.

    Hi
    Can u pls try like this,
    Two Lov's Namely P1_Continent and P1_Country
    In the second Lov P1_country Please refer Cascading LOV Parent Item(s)="P1_continent" and make Optimal refresh as yes.
    and are using the select statement for second lov like this
    Select country from table_name where continent=:P1_country.
    Can pls make change in the List lov ie P1_continent Null Display Value=- select Continent-.
    Hopes this might you.
    Thanks & Regards
    Srikkanth.M

  • Interactive Report - How to display Aggregate values in first row

    Hi,
    I have an interactive report in which I have included aggregate for count.
    But the count doesn't show until I navigate to the last page of the report.
    Any idea how to display all the aggregate values on the top(in first row), so that the user doesn't have to click next to see these values.
    Also when I downloaded the report the aggregate columns are not exported into csv. Any thoughts on this highly appreciated.
    Thanks,
    Raj.

    Any help on this guys ?

  • ? Tsql query to add a sumTotal column from value in current row + value in previous row

    --using Sql Server 2008 (Developer)
    create table #tmp1(rowID int Identity(1,1), val1 int)
    insert into #tmp1(val1)
    select 5 union all
    select 8 union all
    select 12 union all
    select 13 union all
    select 22 union all
    select -7 union all
    select 25 union all
    select 19 union all
    select 32 union all
    select -17
    What Tsql could produce a result set as follows based on the data from #tmp1?
    rowID  val1    sumTotal
    1          5          5
    2          8          13
    3          12        25
    4          13        37
    5          22        59
    6          -7         52
    7          25        77
    8          19        96
    9          32        128
    10        -17       111
    Rich P

    In SQL 2008 check these links
    http://social.technet.microsoft.com/wiki/contents/articles/19670.t-sql-useful-links.aspx#Running_Total
    In SQL 2012 and up, the Running total can be calculated directly with ordered SUM
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Use value of multi record in LOV in same multi record

    Hello,
    I have created a multi record tabular form (report actually). Some fields are select lists with of course an LOV. I would like to use a value of each current row to use in the LOV to make it dynamic.
    This is the where clause of the LOV:
    and rda.tsr_code = :P1103_TSR_CODE (TSR_CODE is a column in the multi record)
    But that is not working, it works when I use:
    and rda.tsr_code = 'M' (but that is not very dynamic and I have to make numerous different LOV's...)
    After reading several pages, I could not find a solution...
    Anyone?
    Edited by: 960788 on 23-sep-2012 13:56

    Hello Garcol,
    Search the forum with Cascading LOV, Tabular Form. You will get lot of threads discussing on this.
    See http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:2003800346210117 blog entry by Jari.
    Regards,
    Hari

  • How to accessing current row report column value in Lov Query?

    Hi,
    which access methods (eg. bind variables, substitutions, ...) for getting the current row report column value can be used in the "Lov Query" property of a report column?
    As what I know of and what I have read on the forum there are no bind variables for the report columns. For the "Link Text" property it seems that the column values exist as substitution strings (#COLUMN_NAME#). But they don't work in the Lov Query. => And would be good because of a hard parse each time the Lov query is executed.
    The following post (Re: Simulating a correlated sub query in lov
    is showing a solution to use package variables for temporary storage of the referenced value, but the only problem with that solution is that if a new record is added with the "Add rows to tabular form" process the package variable still contains the value from the last queried row! Is there a way (variable, APEX package, ...) to determine if the lov query is executed for a new record so that the package can return null?
    I know that I could write the package in a way that the value is immediately cleared when lov_pkg.keyval is called (one time read), but then I would have to create several variables if I'm accessing the value multiple times in the query or in another query => I think an one time read solution would be very obscurely.
    Thanks for your help
    Patrick
    http://inside-apex.blogspot.com

    Hi Patrick,
    I agree that it's a waste to continually use Ajax to go back to the server to get the contents of a dynamic select list.
    There are no bind variables for any row item - but what you do have, as per my previous post, is the value of the data entered by the user in the first row. You can pass this into your application process (using get.add("VARIABLENAME", value)), which can use it to retrieve the correct LOV in your Ajax code - this will give you a "bind variable" that your process can use.
    What you could do, however, is generate hidden select lists on your page - one for each possible LOV list and replace the contents of the new row's select list with the contents of the appropriate hidden select list. This is easy to do with javascript (using innerHTML functions). Obviously, though, the usefulness of this depends on the number and size of the select lists.
    Even if you don't generate them to start with, you can keep a copy of any select lists returned by Ajax in the DOM for use on new rows. So, if you have retrieved a select list, you will have a copy of it in DOM which you can then copy into the new row. If you don't have the list in DOM, use Ajax to get it, store a copy of it and copy it into the new row.
    Which method you use will depend on the number/size of select lists needed. If they are few in number and/or size, I would suggest generating hidden lists. If they are large, use Ajax to get them once, store them and then retrieve them from the DOM when needed.
    There is another thread here where Arie recommends going to the server every time to make sure you get the most up-to-date data for the lists. If you want to follow this advice, for this reason, use get.add("VARIABLENAME", value) to pass the value to your process. If this is not an issue, you can use one of the other methods I outlined above.
    Regards
    Andy

  • How to call a report with a bind variable from a multi-record block

    Hi,
    I have created a report using the BI Publisher functionality. I did all the integration, created the SQL Query and uploaded the template. Up till here everythings fine!
    My SQL Query has 2 bind variables.
    I will call my report from a multi record block, at the end of each record an icon is shown which the user can click to open the report.
    I created a column link for this item (PRINT_REPORT=Inschrijvingsformulier) but I do not manage to pass the parameters to my report. The parameters I want to pass are 2 columns in this Multi Record block.
    I created 2 hidden fields on the page P9_PARAMETER1, P9_PARAMETER2 with the same names as my bind variables and fill this in with the values #PARAMETER1#, #PARAMETER2# from the multi record block.
    It seems it does not work as my report stays empty. (also XML file stays empty).
    Am I trying the wrong way?
    Thanks for any advice,
    Kris

    hi khadeer,
         create one report program and write the required code,and call this function module 'SSF_FUNCTION_MODULE_NAME' and give your smartform name  and also when u activate ur smart form u will get one function module call that function module also and specify any tables used...
    i think this solves ur problem...
    any queries revert back..
    pls reward points if helpful,
    shylaja

  • LOV with where clause containing a value from a row in an updateable report

    I have an updateable report in which a possible value of one column depends on the value of another. I want to use LOVs (there are two different possible), and per row choose which LOV I use, does anyone know if this is possible?
    Thanks
    Wendy

    Wendy - I see that you were able to use the correlated subquery technique (in your other post). This sounds like a slightly different problem but if your query uses the htmldb_item API, I think you could achieve your aim using this same method and decode.
    Scott

  • Checkboxes - htmldb_item.checkbox multi-record updatable report

    htmldb_item.checkbox can be used to display retrieved database values as a check box (e.g. a Y/N Flag).
    These can also be added to an updateable report in a multi-record tab.
    When a new record is created on the multi-row tab however there appears to be no way to render a checkbox. Instead a text box appears instead.
    Is there any way to acheive this?
    This data needs to be present in a multi -row layout
    Thanks
    BTW - I have checked the docos and read the forums.

    Firstly, thank you for the reply.
    I must clarify what I am doing.
    I have a table that has a column in it that is called ZEROFUEL. This can have a value of either Y or N. The user wants a block of these records (say eight) per screen. This column need to be represented by a checkbox. I manage this by calling the NVL(htmldb_item.checkbox(10,ID, DECODE (ZEROFUEL,'Y','CHECKED')),'N')ZEROFUEL, in the report select statement.
    The automatic checkbox (for deletion) is added by the wizard no problem. It is the checkbox for the column ZEROFUEL I am having the problem with.
    If I do not render the checkbox from the sql select then the wizard just creates a little text field display.
    Everything works fine until I press the ADD button. A new record pops up on the bottom of the block with no checkbox on the ZEROFUEL column.
    Eventually there are four columns I need to display as a checkbox. These all need to be displayed in the multi-record tab.
    Am I missing something.
    Thanks

  • Updating a value of a text item in a multi record block based on a change

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • Use of project view to group project records in multi-project report

    I have a summary level multi-project report to report summary level information for active projects.  We are using project view to organize our projects between departments and divisions (hierarchical structure) - represented by folders in project view.  Projects are occasionally moved between project folders.  If anyone has experience with report development using folder structure?  My intent is to create grouping band based on folder structure and list projects under appropriate folder/band. 
    Any assistance is greatly appreciated.
    I am using CM14.1 with OBIP 10.1.1.7
    Thanks,
    Prath

    If you are creating a standard multi-project report (no retrieval criteria; project_state=0)  and you run this report from within PCM, PCM automatically appends to your syntax the filtering criteria for the "folder" the user has highlighted in the project tree.  In this case you would have one report that would retrieve multiple sets of data actively depending upon the project tree position.  I have seen sometimes this causing issues with certain base syntax, but in general this should work.
    Sounds, though, like you're building your report to call to the raw project_view tables, and Rick pointed out you need to use both of these tables then most likely.

  • How could I pass parameter that depend on values in report from report to form?

    In my case, I want to pass 'gno' and 'qno' values of report
    to form. When click on the button then the form is showed.
    There are automatically values in gno field on form so that user
    don't complete this filed.
    So I create a button on the report . I enter Javascript in
    PL/SQL Code tab in '...after displaying the footer' as follow :
    htp.formOpen
    (owa_util.get_owa_service_path||'portal30.wwa_app_module.link?
    p_arg_names=_moduleid&p_arg_values=1736929105&p_arg_names=_show_h
    eader&p_arg_values=YES&p_arg_names=GNO&p_arg_values=1&p_arg_names
    =QNO&p_arg_values=2');
    htp.formSubmit(null,'New Answer');
    htp.formClose;
    The above code can pass only static value, while I want to
    pass values that depend on value in column of report to form.
    So please tell me how can I pass this value to form. I look
    forward to hearing from all of you. Please!!!!!!
    Thank You

    Thanks for the prompt reply.
    Yes. I am using a Custom Step Type.
    I have attached a trial code which contains the trial VI, sequence and the type palette ini file.
    Please have a look at it.
    Regards,
    Mirash
    Attachments:
    Injection trial.zip ‏35 KB

Maybe you are looking for