Htmldb_item.select_list_from_query

Hi, I am running into character or string buffer too small issue when I use
htmldb_item.select_list_from_query or htmldb_item.select_list_from_LOV due to the list being a long one.
Does anyone have a way to overcome this ?
Thank you.

I'm requesting for a workspace.........
Here;s the code while waiting, maybe it's a quick fix.
Basically, when I take off LEVEL4, I do not get the buffer string error.Once I add this field in, the error comes back.
This field is the same as LEVEL1, LEVEL2, LEVEL3.
Code below :
select wwv_flow_item.hidden(1,bud.budget_code_id) BID,
wwv_flow_item.display_and_save(2,bud.company,5) CO,
wwv_flow_item.display_and_save(3,bud.region,5) RG,
wwv_flow_item.display_and_save(4,bud.cost_center,5) CC,
wwv_flow_item.display_and_save(5,bud.product,5) PROD,
apex_item.select_list_from_query_xl(6,level1_id,'select object_name , sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_1,
apex_item.select_list_from_query_xl(7,level2_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_2,
apex_item.select_list_from_query_xl(8,level3_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_3,
apex_item.select_list_from_query_xl(9,level4_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_4
from
qstadmin.qstgl_budget_code_combo@apex_oatst bud,
qstadmin.qstgl_object_name@apex_oatst obj1,
qstadmin.qstgl_object_name@apex_oatst obj2,
qstadmin.qstgl_object_name@apex_oatst obj3,
qstadmin.qstgl_object_name@apex_oatst obj4
where bud.level1_id = obj1.sequence_id (+)
and bud.level2_id = obj2.sequence_id (+)
and bud.level3_id = obj3.sequence_id (+)
and bud.level4_id = obj4.sequence_id (+)
--and bud.level5_id = obj5.sequence_id (+)
--and bud.level6_id = obj6.sequence_id (+)
and bud.company like decode(:P21_COMPANY,'%null%',bud.company,:P21_COMPANY)
and bud.region = decode(:P21_REGION,'%null%',bud.region,:P21_REGION)
and bud.cost_center like nvl(:P21_COST_CENTER_BEGINS,decode(:P21_COST_CENTER,'%null%', bud.cost_center,:P21_COST_CENTER))||'%'
and bud.product = decode(:P21_PRODUCT,'%null%',bud.product,:P21_PRODUCT)
and nvl(obj1.sequence_id,999) = nvl(decode(:P21_LEVEL1, '%null%',obj1.sequence_id, 0,999,:P21_LEVEL1),999)
and nvl(obj2.sequence_id,999) = nvl(decode(:P21_LEVEL2, '%null%',obj2.sequence_id, 0,999,:P21_LEVEL2),999)
and nvl(obj3.sequence_id,999) = nvl(decode(:P21_LEVEL3, '%null%',obj3.sequence_id, 0,999,:P21_LEVEL3),999)
and nvl(obj4.sequence_id,999) = nvl(decode(:P21_LEVEL4, '%null%',obj4.sequence_id, 0,999,:P21_LEVEL4),999)

Similar Messages

  • HTMLDB_ITEM.SELECT_LIST_FROM_QUERY - not found error

    Hi!
    I am trying to use HTMLDB_ITEM.SELECT_LIST_FROM_QUERY in a page source and getting the error message: ORA-06550: line 2, column 4: PLS-00221: 'SELECT_LIST_FROM_QUERY' is not a procedure or is undefined.
    This is HTMLDB 2.0 on Oracle 10.2.0.1.0 on Windows 2000.
    All help is appreciated.
    Thanks!
    Dave Venus

    Chet, I am still having trouble making this work. Let me cover each of the fields in the form and lets see where I am going wrong...... Sections with only a header have the default values.
    Name Section:
    Page: 4
    Name: P4_GROUP_ID
    Display As: Select List
    Displayed Section:
    Sequence: 20
    Region:
    Begin on new line: YES Field: YES ColSPan: 1 RowSpan: 1
    Label Section:
    Element Section:
    Source Section:
    Source Used: Only when current value is session state is null
    Source Type: Static Assignment (value equals source attribute)
    Source Value or Expression: P4_GROUP_ID
    Post Calculation Computation:
    Format Mask:
    Default Section:
    List of Values Section:
    Named LOV: Group_Names
    Display Extra Values: No
    Columns: 1
    Display Null: Yess
    Null Display Value: -- Select Group --
    List of Values definition: select group_name display, group_id return
    from #OWNER#.ittp_group
    ordeer by 1
    Security Section:
    Conditions Section:
    Condition Type: - Item Not Conditional
    Read Only Section:
    Read Only Condition Type: Value of Item in Expression 1 is NOT NULL
    Expression 1: P4_GROUP_ID
    Expression 2:
    Help Text Section:
    Configuration Section:
    Comments Section:
    I really appreciate your time, patience and help!
    Dave Venus

  • HTMLDB_ITEM.SELECT_LIST_FROM_QUERY looses commas from option texts

    Hi,
    I used HTMLDB_ITEM.SELECT_LIST_FROM_QUERY on my custom tabular form. Some of the option display values selected from my table have commas (',') in them, but commas won't get displayed in the resulting select menu, nor are they seen in html source. In the html source however I see that they are probably replaced with spaces (' '). Is it a bug and is there a workaround? Which symbols are replaced in the DISPLAY_VALUE and thus should be avoided (if there is no workaround I should include this information in the help text)?
    Kaja Trees

    Yet in my application there are two regions side-by-side on my test page, one with a query of
    select htmldb_item.SELECT_LIST_FROM_QUERY( 10, 0
    , ' select NAME as DISPLAY_VALUE
              , ID as RETURN_VALUE
              from OBJ_TPL_SELECT_OPTION'
         , ' class="search-table-input-long" ' -- make it longer
         , 'YES' -- show empty choice
         , '0' -- empty choice value
         , '...' ) -- empty choice display
    as sel
    from dual
    which results in a html source of:
    <tr><td class="table-work-overview-firstrow">SEL</td></tr>
    <tr><td class="table-people-overview-white"><select name="f10" class="search-table-input-long" ><option value="0">...<option value="7059909" >1mbit/s<option value="7059910" >NAT DHCP pordi suunamine</select></td></tr>
    and the other with a query of:
    select NAME as DISPLAY_VALUE
    , ID as RETURN_VALUE
    from OBJ_TPL_SELECT_OPTION
    resulting in following html source:
    <tr><td class="table-work-overview-firstrow">DISPLAY_VALUE</td><td class="table-work-overview-firstrow">RETURN_VALUE</td></tr>
    <tr><td class="table-people-overview-white">1mbit/s</td>
    <td class="table-people-overview-white">7059909</td>
    </tr><tr><td class="table-people-overview-white">NAT, DHCP, pordi suunamine</td>
    <td class="table-people-overview-white">7059910</td>
    </tr>
    Where should I look for the reason of no commas in the first result?
    Confused,
    Kaja

  • Bug: htmldb_item.SELECT_LIST_FROM_QUERY p_null_text in

    called htmldb_item.SELECT_LIST_FROM_QUERY in my sql as
    htmldb_item.SELECT_LIST_FROM_QUERY
    ( 10, ss.CHOSEN_ID
    , ' select NAME as DISPLAY_VALUE
    , ID as RETURN_VALUE
    from OBJ_TPL_SELECT_OPTION
    where SELECT_ID = '||s.ID
    , 'onchange="doSubmit(''SAVE_AND_STAY'');"'
    , 'YES'
    , '0'
    and got
    report error: not all variables bound
    If removed the last argument, no error. just FYI
    Hope it will be fixed
    Kaja

    Seems like Sergio was right and the -- was interpreted as comment. I just changed it into '- Choose -' and it works. I just had a custom from php programming to put some -'s to display for empty choice.
    Thank you both,
    Kaja

  • Htmldb_item.select_list_from_query-report error: ORA-01722: invalid number

    Hi, i am trying to create a tabular form
    with one of the item's value depending on another item's value, but i have an ORA-01722: invalid number error
    my application is:
    DESC AC6LIS
    ACLIS_SEQ_ID NOT NULL NUMBER(10)
    ACLIS_TSG_ID NOT NULL VARCHAR2(5)
    ACLIS_EDZ_ID NOT NULL VARCHAR2(3)
    DESC VE1EDZ
    EDZ_TSG_ID NOT NULL VARCHAR2(5)
    EDZ_ID NOT NULL VARCHAR2(3)
    EDZ_DESCRIZ VARCHAR2(50)
    select ACLIS_TSG_ID, htmldb_item.select_list_from_query(2,ACLIS_EDZ_ID,'select EDZ_DESCRIZ, EDZ_ID from ve1edz where ve1edz.EDZ_TSG_ID ='||ac6lis.ACLIS_TSG_ID) edz_select_list from ac6lis
    Any Help?
    Thans in advance
    Costantino

    When your inner SELECT statement is firing it is doing a type conversion. It is seeing a number value in 'ac6lis.ACLIS_TSG_ID' and trying to do a number comparison with 've1edz.EDZ_TSG_ID'. 've1edz.EDZ_TSG_ID' has a non-numeric value in one of the rows which results in your error. To correct this place quotes around the value of 'ac6lis.ACLIS_TSG_ID' like:
    select ACLIS_TSG_ID,
           htmldb_item.select_list_from_query(2,ACLIS_EDZ_ID,'select EDZ_DESCRIZ, EDZ_ID from ve1edz where ve1edz.EDZ_TSG_ID ='''||ac6lis.ACLIS_TSG_ID||'''') edz_select_list
      from ac6lisMike

  • How to add colour to a HTMLDB_ITEM.select_list_from_query in APEX?

    I have created a manual tabular form using HTMLDB_ITEM.select_list_from_query as on of the fields. it queries a look up table for the values.
    for eg. if the field is 'PRIORITY' the list will show 'High', 'Medium', Low.
    I need to color code it as Red, Orange, Yellow resp.
    HTMLDB_ITEM.SELECT_LIST_FROM_QUERY (12,PRIORITY,'SELECT
    INITCAP(lookup_value)
    ,lookup_value r
    FROM ofss_lookup
    WHERE lookup_name = ''PRIORITY''
    ORDER BY lookup_sequence') "PRIORITY"
    that is When the user is inserting a new record he chooses 'High' , in the drop down list the Background color for the word 'High' is red.
    also the existing records queried will also display the color based on the data in the field.
    How can this be done?
    How do i pass the HTML parameters

    Hi,
    You can only update the background colour of the OPTION tag itself.
    What you could do, is something like:
    SELECT ENAME d, EMPNO || '" style="color:yellow; background-color:' || CASE WHEN ENAME LIKE 'A%' THEN 'red' ELSE 'blue' END || '"' r
    FROM EMP
    ORDER BY 1
    {code}
    This example sets the font colour to yellow and the background colour to either red or blue depending on the ENAME value - obviously, adjust as required.
    Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Passing parameter to htmldb_item.select_list_from_query

    Hi,
    I want labeles to be printed in front of my select list boxes but the following call to htmldb_item doesn't work
    SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,job,'SELECT DISTINCT job FROM emp',NULL,NULL,NULL,NULL,NULL,'My Label',NULL) job
    FROM emp
    Do I need to specify all NULL values to set the value of p_item_label
    Thanks

    I am refering to HTMLDB doc. regarding this function:
    HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(
    p_idx IN NUMBER,
    p_value IN VARCHAR2 DEFAULT,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 DEFAULT,
    p_show_null IN VARCHAR2 DEFAULT,
    p_null_value IN VARCHAR2 DEFAULT,
    p_null_text IN VARCHAR2 DEFAULT,
    p_item_id IN VARCHAR2 DEFAULT,
    p_item_label IN VARCHAR2 DEFAULT,
    p_show_extra IN VARCHAR2 DEFAULT)
    RETURN VARCHAR2;
    I need to print a label for each item. How do I pass the parameter to the
    function? How do I do that?
    SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,job,'SELECT DISTINCT job FROM emp',NULL,NULL,NULL,NULL,NULL,'My Label',NULL) job FROM emp
    Doesn't work
    John

  • Select_list_from_query function null value

    How does one remove the null value when using the select_list_query function?
    So if I have the following:
    SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,id,'SELECT id FROM emp')
    FROM emp
    It currently adds the extra null '%' value.
    Where would I plug in the p_show_null value in the function or is this not possible?

    Thanks for the help. I found out it was the positioning of the NO parameter value.
    If I simply added one 'NO' after the query, it would not recognize it but when I added 2 'NO' 's as displayed below then it removed the null value.
    SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,id,'SELECT id FROM emp', 'NO', 'NO')
    FROM emp
    Thanks again.

  • SELECT_LIST_FROM_QUERY AND performance

    When
    SELECT empno, htmldb_item.SELECT_LIST_FROM_QUERY (1, ename, 'select ename, empid from emp')
    FROM emp
    is used in query, does the same SQL statement 'select ename, empid from emp' get executed once per row of result? If so, is there any way to 'cache' it to improve the performance.
    Thanks
    Ravi

    Yes, I realize that.
    As I said, I thought the reason that the engine executes that LOV query over and over again for each row is to accomodate for cases like
    htmldb_item.select_list_from_query(1,col,'select d,r from mytab where somecol='||othercol)In other words, the select list query (could) return a different set of rows for each row in the main query. In this case, it makes sense to execute the LOV query for each row.
    But when using htmldb_item.select_list_from_lov(1,col,'SHARED_LOV') the LOV query is the same for the duration of the main query, so Apex could optimize things by running the LOV query just once, (before running the report query), storing it in some package variable, and then using those "cached" values when executing the report SQL.
    Thanks.

  • Htmldb_item.select_list_ referecing submitted results

    Hi,
    I have the following situation. I have a "dynamic" table of questions with n number of rows. The table consists of 1 col for plain text, and 1 col of multiple select list. I generate this table with the form elements dynamically.
    When I go to process and validate I store all the questions numbers in htmld_application.G_F01 and can reference them as: htmld_application.G_F01(i). I store all text results in htmld_application.G_F02 (same referencing). I can link the text answer to the question based on the looping counter 'i'. I store the select results in htmld_application.G_F03. Now for the select if I were only to chose 1 value for each select list I would be fine. It seems if I do a multiple select it stores each selected value in a new "row". As you can see this causes a problem since my list is out of order.
    When reading the document for htmldb_select_list_from_query for the p_idx value it says: "Typically the p_idx parameter is constant for a given column."
    Any idea on a work around? I'd like all the values in a select list for a given 'i' to be colon delimited. EX: select list A would return blue:red:orange in it's element rather then return it in 3 different positions.
    Sorry this sounds a bit confusing. Any help is appreciated.
    Thanks,
    M

    Scott,
    Here's my entire situation. I've stripped unnecessary items to focus on the main problem.
    Suppose I have a table that contains "dynamic" questions. The main columns are as follows:
    question_id
    question_name
    There is also a table which stores the answers.
    question_id
    answer_text (for plain text answers)
    answer_lovs(list of values if the user selects from a multiple select box)
    The user can enter either a plain text answer or select from a multiple select box.
    Ok so now we get to the part of displaying the questions. Here's what the code looks like
    LOOP over all the questions
    .... display quesiton name ...
         htmldb_item.hidden(p_idx => 1, p_value => question_id);
         htmldb_item.text(p_idx => 2, p_value => '');
         htmldb_item.select_list_from_query (p_idx => 3, p_attributes => ' multiple ', p_query => my query);
    END LOOP;
    Note that all the quesiton_id's are stored in idx = 1, text in idx =2, and answer_lovs in idx = 3. Also note that the select list is a multiple select list.
    When the page is submitted the "array" (i.e. the htmldb_application.G_Fxx )should look like this:
    question_ids [1,2,3]
    answer_text ['a','b','c']
    answer_lovs ['g','h','k']
    The above example assumes that the user only selects 1 value in the multiple select lists.
    If they select multiple values from the select list here's what happpens.
    q 1 user selects 'g'
    q 2 user selects 'j' and 'u'
    q 3 user selects 'i'
    the new "array" will look like this:
    question_ids [1,2,3]
    answer_text ['a','b','c']
    answer_lovs ['g','j','u','k']
    when I thought that the array would look like:
    question_ids [1,2,3]
    answer_text ['a','b','c']
    answer_lovs ['g','j:u','k']
    If you look at the last 2nd to last set of values the "order" is completely out of place. Anyway of doing something so my results turn out like the last set of values?
    Please let me know if this makes sense.
    Thanks. M.

  • HTMLDB_ITEM   ... Help

    Hi I have the basic update form as shown below... I am trying to capture the data that is associated with the checked rows...
    Report with checkbox:
    select htmldb_item.checkbox(1,empno) empno,
    ename,
    htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
    htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
    wwv_flow_item.date_popup(6,null,hiredate) hiredate,
    htmldb_item.text(7,sal,10) sal,
    htmldb_item.text(8,comm,10) comm,
    htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
    from emp
    pl/sql submit process to capture rows..
    FOR I IN 1..HTMLDB_APPLICATION.G_F01.COUNT
    LOOP
    insert into test_table (pk) values ( HTMLDB_APPLICATION.G_F07(HTMLDB_APPLICATION.G_F01(i)) );
    END LOOP;
    Every time I run this process I get the following error...
    ORA-01403: no data found
    I am not sure why this is happening, I can insert HTMLDB_APPLICATION.G_F07(i) but it is not letting me reference "the seventh column" for each row that has been selected...
    any ideas?

    See Re: Problem with validation and tabular form
    Indices for F07 go from 1 to number of rows rendered on the report.
    f_07(f01(i)) evaluates to f_07(1234) if you select the checkbox corresponding to empno=1234.
    Clearly, this will generate a ORA-1403 since you don't have 1234 rows in your tabular form.

  • Htmldb_item(s) are null but return query values

    Hi,
    I have used the following query to create a region (I've done many like this).
    When I access the htmldb_application items in insert statements it works fine.
    But, when I try to do an update statement the htmldb_application items are null;
    even after returning & displaying the values on screen. Hope this makes sense.
    Region:
    Select x.establishment_name,
    x.hsd_insurance_policy_number,
    x.hsd_insurance_group,
    x.del
    from
    (Select
    htmldb_item.text(11,establishment_name,20) establishment_name,
    htmldb_item.text(12,hsd_insurance_policy_number) hsd_insurance_policy_number,
    htmldb_item.text(13,hsd_insurance_group) hsd_insurance_group,
    htmldb_item.hidden(14,hsd_person_insurance_id) hsd_person_insurance_id,
    htmldb_item.hidden(15,gen_establishment_id) gen_establishment_id,
    htmldb_item.hidden(16,gen_adr_id) gen_adr_id,
    htmldb_item.checkbox(20,gen_person_id) del
    from hsd_insurance_v
    where gen_person_id = :HSD_Per_Identifier
    union all
    Select
    htmldb_item.text(11,null),
    htmldb_item.text(12,null),
    htmldb_item.text(13,null),
    htmldb_item.hidden(14,null),
    htmldb_item.hidden(15,null),
    htmldb_item.hidden(16,null),
    htmldb_item.checkbox(20,null) del
    from all_objects where rownum < nvl(:P4300_ROWS3,2)) x
    Update Statement:
    Begin
    for i in 1..htmldb_application.g_f11.count
    loop
    If htmldb_application.g_f11(i) is not null Then
    Update HSD_PERSON_INSURANCE
    Set
    HSD_INSURANCE_POLICY_NUMBER = htmldb_application.g_f12(i),
    HSD_INSURANCE_GROUP = htmldb_application.g_f13(i),
    LAST_UPDATE_BY = :P4300_Updated_By,
    LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
    where
    hsd_person_insurance_id = htmldb_application.g_f14(i);
    Update Gen_Establishment_Entity
    Set
    ESTABLISHMENT_NAME = htmldb_application.g_f11(i),
    LAST_UPDATE_BY = :P4300_Updated_By,
    LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
    where gen_establishment_id = htmldb_application.g_f15(i);
    end if;
    end loop;
    end;

    Susan,
    In 1.5, htmldb_item.select_list_from_query didn't support "display extra values" behavior. Now it does and a tenth parameter (p_show_extra in varchar2 default 'YES') allows you to disable it with 'NO'.
    In your example, the query selects only non-null commisions, but setting p_show_null=>'YES' gives you the first null row and the default setting p_show_extra=>'YES' gives you the last null row, which is the "selected" option for rows where the comm column is null.
    Add ,NULL,NULL,'NO' to the function call to eliminate the unwanted row.
    Scott

  • HTMLDB_ITEM.date_popup on single row report does not work

    Dear HTML DB Team,
    On a report wit a single( one ) row the "HTMLDB_ITEM.date_popup" does not fill the selected date to the cell. (Same for wwv_flow_item.date_popup)
    On the same report with 2 or more rows HTMLDB_ITEM.date_popup works fine.
    Any suggestions?
    Erik
    testcase:
    create region:
    select htmldb_item.hidden(1,empno) empno,
    ename,
    htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
    htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
    wwv_flow_item.date_popup(6,null,hiredate) hiredate,
    htmldb_item.text(7,sal,10) sal,
    htmldb_item.text(8,comm,10) comm,
    htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
    from emp
    delete 13 rows from emp ( 1 row left ):
    delete from emp
    where ename <> 'KING';
    => date_pop does not work

    Using the htmldb_item API vs. built-in multi-row update functionality:
    I can't speak to the question about the date for the next HTML DB release. But I'd like to add a few comments to this discussion regarding the use of the htmldb_item API package. It is generally advisable to use the built-in multi-row update functionality instead of htmldb_item function calls when implementing tabular forms. While I do acknowledge that some display types such as date popups are not yet available, I would nevertheless recommend working with what's available on the report column attributes page (i.e. using a text field for the date columns) as opposed to using htmldb_item functions whenever possible. Please keep in mind though that they are mutually exclusive, so they can't be combined on the same report.
    The reasons for my recommendation are simple: first of all, if you use htmldb_item calls as part of your SQL statement, the HTML form elements are rendered for all rows in your result set. The built-in types on the other hand only render HTML form elements for those rows shown on your current page, thus you get better performance. Secondly, htmldb_item calls make your SQL statement quite complicated, not only has the engine to jump back and forth between executing your SQL and calling the PL/SQL functions, you also need to take extra care implementing your PL/SQL processes according to the item IDs you assigned in your htmldb_item function calls. When working with e.g. popup LOVs, this gets even more complicated because that type actually results into two html form elements for each column (one storing the hidden ID, one storing the display value). And lastly, by using the multi-row update functionality, you would get lost update detection automatically built. That means, that you can't accidentally overwrite another person's changes in the event that you should both be working on the same data. Implementing this kind of functionality with your htmldb_item based tabular forms would take a lot more effort than simply go with what's already provided.
    So please carefully weigh the benefits of additional display types that you'll get by using the htmldb_item API against all the functionality you'll get by using the built-in tabular form and multi-row update features.
    Regards,
    Marc

  • Column headings as HTMLDB_ITEMS

    Is there a way to return column headings and HTMLDB_ITEMS? I am trying to place select lists into certain columns to be used as column filters to dynamicly build where clauses.

    James,
    I think it is possible, though I haven't tried something like this before. You would start with building your report region as a PL/SQL function returning SQL query, the query could look something like this:
    return 'select ename, job, sal, comm, deptno from emp';
    You would have to include some dynamic where clause of course. In the next step, you would go the reports attributes page and change the column headings type to be a PL/SQL function returning a colon-delimited list. And that function could look like this for the query above:
    return 'Name:Job:Salary:Commission:'||htmldb_item.select_list_from_query(1,null,'select dname, deptno from dept')
    Then you need to also have a submit button that actually submits your page and a branch that takes you back to your page. Or you could have the select list in your column headings do an auto-submit instead, this could be done when using the following function for the headings instead of the one shown above:
    return 'Name:Job:Salary:Commission:'||htmldb_item.select_list_from_query(1,null,'select dname, deptno from dept','onChange="doSubmit(''f01'');"')
    And you will also need a after submit process, that assigns the value selected to e.g. a page item that you then could use to build your dynamic SQL query. You can find information and examples for how to process items build using the htmldb_item package in the following How-To document. This document is about tabular forms, so it is different from what you are building, but it should provide you with the information needed.
    http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.html
    I hope this gives you some ideas, let me know how it works out,
    Regards,
    Marc

  • How do I display the correct value when using SELECT_LIST_FROM_QUERY

    I have an updatable report that displays the possible values for a field.
    I'm using HTMLDB_ITEM.SELECT_LIST_FROM_QUERY, so obviously I have to process the record manually.
    However, I need the trick to display the correct value as selected before processing the records.
    I appreciate your help.
    Thanks
    Juan

    Thank you.
    So, I just need to put the field name in the second argument.
    I have it working now.
    Thanks again
    Juan

Maybe you are looking for

  • Is there any way to transfer all the songs I have on my iphone to the Itune?

    Because my laptop driver broke and i lost everything and I would like to know if there's a way that i wont loose all the songs i have on my iphone.. Please help... I had so many songs bought from store and all.. i do not wanna loose everything over a

  • What is Rich Text in Mail.app?

    When I compose a message in Mail.app, I have the option of sending it in "Plain Text" or "Rich Text".  When I receive a Formatted Text message in Mail.app, it is generally --but not always-- handled correctly. The formatting applied by the sender, in

  • KI222 - Inappropriate Cost Center Not Valid Error Message

    Iu2019m having a problem goods issuing material to a cost center (movement type 201) via a call of the BAPI_GOODSMVT_CREATE BAPI (ECC 6.0).  I can post a specific material / plant / storage location / cost center combination without issue via MB1A bu

  • Itunes not working with windows 8

    Just downloaded the Windows8 consumer preview and Itunes will not open, I removed and reinstalled the newest version but still does not open. I have tried running as administrator, and also running in compatability mode but nothing seems to work any

  • Uncoated Fogra29 Printer Profile in CC missing...

    I use this profile in CS5, i tried in CC and the profile is not there.  I  tried installing the ICC bundle here http://www.adobe.com/support/downloads/product.jsp?product=62&platform=Windows but Uncoated Fogra29 or any Fogra profiles are not selectab