Highlight Multiple Rows in a Report

Hello all,
I'm trying to implement a highlight as seen here,
http://www.netlobo.com/javascript_background_color_toggle.html
function toggleBgColor(elem)
var style2 = elem.style;
style2.backgroundColor = style2.backgroundColor? "":"#FFFF00";
I have the above javascript in my report's region header and an onclick = "toggleBgColor(this);" in my report template (Horizontal border)
I can run the page, but nothing happens on click. No errors and no highlighting.
Any ideas are much appreciated.
Thanks

Both places should work, but the page header is cleaner.
Maybe it's not in the correct place in the template? Can you put up an example on apex.oracle.com?
I linked to Carl's sample app more as a general HTML/CSS/javascript intro, especially for plugging things into APEX. He doesn't have an example exactly like you're looking for, but he does have some row highlighting here.

Similar Messages

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • Deleting multiple rows in a report ?

    db11gxe  , apex 4.0 , firefox 24 ,
    how to delete multiple rows in a report at one time ?
    thanks

    Hi newbi_egy,
    Here is a small demo with few steps that can be used in your scenario-
    1) Below is the query of a report on emp table which has empno column with unique values-
    SELECT APEX_ITEM.CHECKBOX(1,empno) " ", ename, job FROM   emp ORDER  by 1
    2) A Delete button is created that submits the page.
    3) An on-submit process is created with Process point On Submit - After Computation and Validations with condition that the below process runs when Delete button clicked.
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    delete from emp where empno=APEX_APPLICATION.G_F01(i);
    END LOOP;
    END;
    I hope this might help you.
    Regards,
    Das123

  • Want to update multiple rows of the report but getting a bug.

    hi,
    I am trying to update multiple rows of a report.For that I have created a teport with dynamic checkbox generated using ---HTMLDB_ITEM.CHECKBOX(1,utt.trouble_ticket_id) " "----.Checkboxes are rendered perfectly on the report.
    but when I tried to update the selected rows of the report as given in the documentation
    begin
    :P16_priority:=htmldb_application.G_F01.count;
    for i in 1..htmldb_application.G_F01.count
    loop
    update umanage_trouble_ticket set severity =:P16_priority where
    trouble_ticket_id = htmldb_application.G_F01(i);
    end loop;     
    end;
    I found that all the rows are updated.not only selected rows.
    and the count it gives =no of rows returned + no of rows selected.
    Please help me regarding this.
    thanx.
    BHARAT

    Hi Bernhard,
    I think that u didnt get y problem.
    When I take the value from "htmldb_application.g_f01(i)" then it should return id's of rows that are checked but when I do that it returns id's of all the rows.So I am not able to update only checked rows.
    from id's of rows i mean value provided when generating checkboxes through query.
    htmldb_item.checkbox(1,trouble_ticket_id) " "
    I am approching to the solution as specified in the documentation. "Adding check boxes to each row in a report".
    but still cant find any solution.
    thanx that u showed some intrest in my problem.
    If u can get the solution reply soon.
    Regards
    BHARAT

  • Highlight  a row in classic report based on condition

    HI all Gurus
    Using Apex 4.1.1 oracle 11g linux oc4j
    I want to highlight a row where #column_value#='Y' to grey  keep others as normal report settings.
    I have a simple sql query
    SELECT PK_ID,
      FIRST_NAME,
      LAST_NAME,
      INITIAL_REG_DATE,
      MAIL_DATE,
      BEGIN_DATE,
      END_DATE,
      END_DATE-BEGIN_DATE as "#days",
      BEGIN_STATUS,
      END_STATUS, 
      COMMENTS,
      DELETE_FLAG,
    case when  DELETE_FLAG='Y' then 'GREY' else '#f0f0f0' end  DELETE_FLAG ,
    INITIAL_REG_DATE+(END_DATE-BEGIN_DATE) "New Reg end date"
    FROM SOR_TRACKING_DEL
    where pk2_id =:P216_Detail
    order by mail_Date desc
    I created a Dynamic action
    which will fir on on load , BIND on this classic report
    $("input[name=f29]").each(function(){ 
    var lThis=$(this); 
    if(lThis.is("Y")){ 
      lThis.parents("tr:eq(0)").children("td").css({"background-color":"GREY"}); 
    } else { 
      lThis.parents("tr:eq(0)").children("td").css({"background-color":"#f0f0f0"}); 
    But this is not changing color as expected..
    Kindly help me !
    Thanks

    Scott and Tom
    Thanks you guys for looking into this.
    Pls ignore my improper explanation and my inexperience with jquery.
    I read some blog and was trying to do same on classic report but all blogs I found so far referred either interactive report or tabular report none of them mentioned classic report.
    I guess using array for classic report wont be a good idea to start with. :/
    I am not sure if this is right syntax and logic to highlight the row
    $(function(){
    var DELETE_FLAG = $(this);
        if DELETE_FLAG.is("Y"))
      DELETE_FLAG.parents("tr").children("td").css({"background-color":"GREY"});
    I also created app here
    http://apex.oracle.com/pls/apex/f?p=35155
    workspace sors
    user tester/testing
    application 35155
    Thanks again.

  • Multiple rows in interactive reports?

    Can we click on multiple rows at a time in interactive reports??
    If yes how.....
    Would reward.
    thanks

    alchemi,
        u can use that one by using the  hide stmt on the desired two fields.
    And in the first secondary list, u can put a if condition for the hided fields. so that if the condition is satisfied u can process a set of commands else process the other block of commands.
    Regards...
    Arun.
    Reward points if useful.

  • Highlight multiple rows with coding

    Hi all,
    Can anybody solved my problem?
    I have 3 JTable which are dependent of each other.
    Hence if i select a row in one of them, the other 2 need to highlighted
    respectively.
    I understand that using
    JTable.setRowSelectionInterval(int index0, int index1)
    can highlight rows by code, but it needs to be in a running order.
    I need to accomodate selection of multiple rows, some not in a running order.
    Anyway, thanks for your help in advance...

    Hi,
    Try compiling what I wrote below and running it. I'm pretty sure this is what you are trying to do?! Let me know if this is what you want.
    Thanks,
    code below
    package mypackage;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import java.util.EventObject;
    public class Dialog1 extends JDialog {
    JPanel _mainPanel;
    JTable _table1;
    JTable _table2;
    JTable _table3;
    MyListSelectionListener _table1Lstnr;
    MyListSelectionListener _table2Lstnr;
    MyListSelectionListener _table3Lstnr;
    Object[] _tablecol = {"Column1", "Column2", "Column3"};
    Object[][] _tablerow = { {"row1", "row1", "row1"},
    {"row2", "row2", "row2"},
    {"row3", "row3", "row3"},
    {"row4", "row4", "row4"},
    {"row5", "row5", "row5"},
    {"row6", "row6", "row6"}};
    Dimension TABLE_DIM = new Dimension( 50, 100 );
    public Dialog1() {
    this.setTitle("Test Frame");
    this.setModal(true);
    init();
    public void init() {
    _mainPanel = new JPanel( new GridBagLayout() );
    GridBagConstraints gbConstraints = new GridBagConstraints( 0,0,1,1,1,0,
    GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL,
    new Insets(5,5,5,5),0,0);
    table1 = new JTable(tablerow, _tablecol);
    _table1.setName("table1");
    _table1.setColumnSelectionAllowed(false);
    _table1.setRowSelectionAllowed(true);
    table1.setSelectionMode(ListSelectionModel.MULTIPLEINTERVAL_SELECTION);
    table1Lstnr = new MyListSelectionListener(table1);
    table1.getSelectionModel().addListSelectionListener( table1Lstnr );
    JScrollPane table1SP = new JScrollPane( _table1 );
    table1SP.setPreferredSize( TABLE_DIM );
    _mainPanel.add( table1SP, gbConstraints );
    gbConstraints.gridy = 1;
    table2 = new JTable(tablerow, _tablecol);
    _table2.setName("table2");
    _table2.setColumnSelectionAllowed(false);
    _table2.setRowSelectionAllowed(true);
    table2.setSelectionMode(ListSelectionModel.MULTIPLEINTERVAL_SELECTION);
    table2Lstnr = new MyListSelectionListener(table1);
    table2.getSelectionModel().addListSelectionListener( table2Lstnr );
    JScrollPane table2SP = new JScrollPane( _table2 );
    table2SP.setPreferredSize( TABLE_DIM );
    _mainPanel.add( table2SP, gbConstraints );
    gbConstraints.gridy = 2;
    gbConstraints.weighty = 1;
    table3 = new JTable(tablerow, _tablecol);
    _table3.setName("table3");
    _table3.setColumnSelectionAllowed(false);
    _table3.setRowSelectionAllowed(true);
    table3.setSelectionMode(ListSelectionModel.MULTIPLEINTERVAL_SELECTION);
    table3Lstnr = new MyListSelectionListener(table1);
    table3.getSelectionModel().addListSelectionListener( table3Lstnr );
    JScrollPane table3SP = new JScrollPane( _table3 );
    table3SP.setPreferredSize( TABLE_DIM );
    _mainPanel.add( table3SP, gbConstraints );
    this.getContentPane().add( _mainPanel );
    class MyListSelectionListener implements ListSelectionListener {
    JTable selectedTable;
    MyListSelectionListener(JTable table) {
    selectedTable = table;
    public void valueChanged(ListSelectionEvent e) {
    String tableName = selectedTable.getName();
    int[] selectedRows;
    if( tableName.equals(_table1.getName()) ) {
    selectedRows = _table1.getSelectedRows();
    table2.getSelectionModel().removeListSelectionListener( table2Lstnr );
    table3.getSelectionModel().removeListSelectionListener( table3Lstnr );
    _table2.clearSelection();
    _table3.clearSelection();
    for( int i=0;i<selectedRows.length;i++){
    _table2.addRowSelectionInterval(selectedRows,selectedRows[i]);
    _table3.addRowSelectionInterval(selectedRows[i],selectedRows[i]);
    table2Lstnr = new MyListSelectionListener(table2);
    table3Lstnr = new MyListSelectionListener(table3);
    table2.getSelectionModel().addListSelectionListener( table2Lstnr );
    table3.getSelectionModel().addListSelectionListener( table3Lstnr );
    } else if( tableName.equals( _table2.getName()) ) {
    selectedRows = _table2.getSelectedRows();
    table1.getSelectionModel().removeListSelectionListener( table1Lstnr );
    table3.getSelectionModel().removeListSelectionListener( table3Lstnr );
    _table1.clearSelection();
    _table3.clearSelection();
    for( int i=0;i<selectedRows.length;i++){
    _table1.addRowSelectionInterval(selectedRows[i],selectedRows[i]);
    _table3.addRowSelectionInterval(selectedRows[i],selectedRows[i]);
    table1Lstnr = new MyListSelectionListener(table1);
    table3Lstnr = new MyListSelectionListener(table3);
    table1.getSelectionModel().addListSelectionListener( table1Lstnr );
    table3.getSelectionModel().addListSelectionListener( table3Lstnr );
    } else if( tableName.equals( _table3.getName()) ) {
    selectedRows = _table3.getSelectedRows();
    table1.getSelectionModel().removeListSelectionListener( table1Lstnr );
    table2.getSelectionModel().removeListSelectionListener( table2Lstnr );
    _table1.clearSelection();
    _table2.clearSelection();
    for( int i=0;i<selectedRows.length;i++){
    _table1.addRowSelectionInterval(selectedRows[i],selectedRows[i]);
    _table2.addRowSelectionInterval(selectedRows[i],selectedRows[i]);
    table1Lstnr = new MyListSelectionListener(table1);
    table2Lstnr = new MyListSelectionListener(table2);
    table1.getSelectionModel().addListSelectionListener( table1Lstnr );
    table2.getSelectionModel().addListSelectionListener( table2Lstnr );
    public static void main(String[] args) {
    Dialog1 dialog = new Dialog1();
    dialog.setSize( new Dimension( 400, 400 ) );
    dialog.setVisible(true);

  • Highlight current row on Interactive Report

    What is the best way to highlight (or identify) the current row in an Interactive Report?
    I’ve created an interactive report, based on a custom SQL query, with a link (on the primary key (id)) to give the user the possibility to select a certain record (that will show some additional regions with detail information). How can I identify (highlight, indicator) the selected row in an Interactive Report?
    Many thanks for your help,
    John

    I wanted the same without using jQuery. Roel's example set me on the right track. To ensure keeping my current row highligthing after using the pagination links I've managed to dynamicly modify the pagination link in the IR using javascript, but I have a little (I hope) problem left.
    I've managed to change the pagination link when rendering the page from
    <a h ref="javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')"></a>to
    <a h ref=javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15');highLight(this)></a>Unfortunatly my added code does not notice the changes made by the gReport.navigate.paginate code. It does only work when I add an alert (); in my highLight code. This alert will force showing the changes made in the DOM-model by gReport, allowing the highLight function to re-exame the DOM-model and change the pagination link.
    Anyone an idea how to overcome this problem ?
    Kind regards,
    Ralph

  • How to delete multiple row in classic report.

    Dear Friends,
    i am using 4.1 ve.
    i have created classic report.i want to delete row .
    How can i do it.
    i need check box in classic report and if i select multiple check box then row should delete and before delete pop up should be pop up to confirmation to delete.
    How can i do it.
    Thanks

    Hi Vedant,
    here you have one advanced example:
    http://www.talkapex.com/2009/01/apex-report-with-checkboxes-advanced.html
    But you can do it easier using only apex_item.checkbox (creating one column in report query with this function).
    After you submit this page the value will be stored to apex_application.g_f0X variable where X is equal to p_idx param of function apex_item.checkbox.
    Note: only checked values will be stored.
    Br,
    Marko Goricki
    http://apexbyg.blogspot.com

  • JTable: Highlighting multiple rows

    Hello,
    I have a simple problem: I want to highlight rows 2,4 and 8 of a JTable using the colors blue, red and green respectively. (JTable is being used as a spreadsheet)
    How do I do this? Can someone please help.
    Thanks,
    Nadeem

    Search the forum for jtable row +highlight and you should find your answer somewhere on the list:
    http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=Swing&qp=forum%3A57&qt=%2Bjtable+%2Brow+%2Bhighlight
    ;o)
    V.V.

  • How to highlight a row in a standard report?

    Friends,
    Hope you can help.
    I need to highlight a row in standard report dependent on some criteria.
    Having searched the forum I have been trying to implement the example given here.
    This is what I have done:
    1) Create a new report using the following query
    select decode(deptno, 10, 'class1', 20, 'class2', 30, 'class3') trclass , ename, job, sal, comm from emp
    2) Created a new Report Row Template from scratch and added the details given in the example above.
    3) Placed the CSS Style sheet code in the stylesheet box at the following location:
    Shared Components>Cascading Style Sheets>Edit Cascading Style Sheet
    3) Ran the page
    4) Employee report is displayed but nothing is highlighted.
    What have I done wrong?
    Thanks in advance for any help given (which of course will be marked helpful\correct!)
    Ian

    >
    >
    3) Placed the CSS Style sheet code in the stylesheet box at the following location:
    Shared Components>Cascading Style Sheets>Edit Cascading Style Sheet
    >
    What have I done wrong?The CSS needed to go in the page HTML Header.

  • Selecting multiple rows in BW Web reports

    Hello Everyone,
    I am working on the BW web report where we want to give user interaction screen through BSP.
    We achived this for a single row in BW report where when user clicks on some link or button it opens up the BSP screen with the selected row value in BW report.
    Now we want to give multiple rows option where user can select multiple rows in BW report and the corresponding values should be available in BSP by clicking of some button in BW.
    has anyone done this before. thanks in advance.
    regards
    rajeev

    HI
    Int leadSelection = wdcontext.nodemodelnode.getLeadSelection();
      for(int i=0;i<wdcontext.nodeModelNode.size;i++)
        if(wdcontext.nodeModelNode.isMultiselected(i) || leadSelection ==i)
               String name = wdcontext.nodemodelnode.getnameelementatindex(i).getName();
               String  address = wdcontext.nodemodelnode.getaddresselementatindex(i).getAddress();
               String age = wdcontext.nodemodelnode.getAgeelementatindex(i).getAge();
            Create a method for the Table Property onLeadSelect() where you can open a popup window
             Create a value node and with attributes same as Table attributes and then set the values of the table
             to the value node attributes.
    Thanks

  • Deleting a single row in a report using checkbox

    Hi,
    Can anyone please help me on how to perform a deletion of a single row/multiple rows in a report when one clicks on a checkbox ..
    I went throught the HOWTO's guide .. But when i select a checkbox and say delete i get the following error:
    ORA-20001: Error in multi row delete operation: row= 12, ORA-01403: no data found,
    Waiting for your replies soon
    Thanks in advance
    Rakesh

    jabalsad wrote:
    Hi,
    I am fairly new to JSF so please bear with me if the answer is obvious :D. I'm using a dataTable component to display data from a database and would like to add a commandLink component to every row in the table that deletes that row from the database. What is the most effective way of doing this?
    I'm thinking of using a ListDataModel with some function that removes the correct row (though I'm not sure how it will tie in with a commandLink and exactly where the database will be updated). I'll appreciate any pointers or perhaps even an online example of something similar.
    Alternatively I suppose you could pass an "id" parameter on with the commandLink that somehow gets read in the request and the appropriate row is removed accordingly. This solution seems cumbersome however.Yes, your instincts are correct there. Binding the data model to a backing bean to get the UIData instance for the table. Then use UIData.getRowData() to get the object corresponding to the row containing the link/button. Then execute your business logic to delete the row from the database. Then you need to ensure the data model is updated to reflect the new state of the database.

  • Easy way to highlight the row you are editing

    Hi,
    How can I easily highlight the row in a report with an edit button when I click this button. If I click it I go to another page but when I come back( After saving modifications) I want the row I just edited highlighted
    Thank you for the help
    Erwin

    Hello Erwin,
    First, you need to add an ID to every row in your report, so you’ll be able to manipulate it on the DOM level. Duplicate your report template, and edit the Before Each Row field to look similar to the following:
    <tr #HIGHLIGHT_ROW# id="#ROWNUM#">I’m using a hidden item on the report page, to hold the rownum of the report line I’m branching to edit. I’m setting this item in the link column (or in the f?p URL) to be #ROWNUM#.
    I’m using an onload event to fire the following JS function:
    function colorLinkRow(pItem, pColor) {
       var elm = $x(pItem);
       if (elm.value > 0) {
         $x(elm.value).style.backgroundColor = pColor;
    }The pItem parameter is the hidden item name, and the pColor is the background color I want to use.
    This code assuming only one report region per page. Otherwise, you need to take different approach to setting unique IDs to your reports lines.
    Regards,
    Arie.

  • Highlighting corresponding rows in table with mouseover

    I have a requirement where I need to highlight multiple rows that are logically grouped together in a table. I was thinking of accomplishing this by:
    1. Add an invisible column to the table.
    2. Set the column's StyleClass in the code to some indicator.
    3. Add a client listener to the table/row?? of type mouseover to identify the row being hovered over.
    4. In Javascript, select all the rows that have the same StyleClass as the row being hovered over and set their background color.
    I am having trouble with step #3 because I am unable to add the client listener to a table/row to identify the row that is hovered over. Note that the user is not clicking on the row so I cannot use the "current row".
    If there is no way to identify the row, is there any other way to highlight multiple rows on mouseover?
    I am using JDeveloper 11.1.1.5.
    Thanks.

    Hi Frank, I tried adding the clientListener to each cell renderer component but the problem I noticed with that was that the cell components do not always occupy the entire width of the column so the user has to hover over the cell which may be a tiny part of the cell.
    I did however find an alternate solution using JQuery. So instead of adding the client listeners to each component, I added a JQuery .hover() function on document load. Below is the javascript that is loaded on the page load.
    <af:resource type="javascript">
    function initialize()
    //the class name that will be looked at in the DOM and highlighted
    var classToHighlight = "";
    //TODO will need to use .live("hover") if using PPR on the page
    $('.columnClass').hover(
    function(data)
    $($(this).attr('class').split(' ')).each(function()
    if (this !== '')
    if ( this.indexOf("bgHighlightClass") == 0 )
    classToHighlight = this;
    $("." + classToHighlight).css('background-color', 'orange');
    function(data)
    $("." + classToHighlight).css('background-color', 'white');
    classToHighlight = "";
    </af:resource>
    <af:clientListener method="initialize" type="load"/>

Maybe you are looking for

  • Ware is the my To Do data from 10.6 after up grade to Maverick 10.9

    I would be happy if I can retreve the data from backup and use it in Note's or Reminders or even a word dock. New Queston My cheep LG phone used to connect vea USB but now I cant see it in the Finder.Is there something I am missing . Thank You Albert

  • After updating to 11.3.1 all of my library is gone

    Yesterday, I finally updated my iTunes to the latest version 11.3.1.2. Now my entire library is missing from iTunes.  There isn't even a Previous libraries folder in the /users/user_name/my music/itunes folder.  I still have all of my local music fil

  • CSS not rendering in preview

    I am creating a website that uses a stylesheet for viewing on the web and one for print. For web viewing the link tag is link rel=stylesheet href=styleweb.css media=screen. For print the link tag is link rel=stylesheet href=styleweb.css media=screen.

  • How to connect DB in Forte C++

    i'm beginner .i want to know how to connect DB in forte C++?someone tell me using ODBC.but i don't know how to do it?Would you give me a article or program guide about it?thank you ! email:[email protected]

  • Badi or user exit to split the quantity ,weight ,volume in vl02n tcode

    hi , Can anybody help me spltiing the quantity ,volume , weight in vl02n tcode if any uerexit or badi  based on some condition Edited by: anitasha123 on Mar 18, 2010 4:16 PM