Highlight row baced on condition

Hi,
i have an interactive report. i want to highlight some rows in it baced on a condition on another table. Example:
Table holiday record
ID          Name             Start          End             Status
1           ABC                2/2            2/3             Applied
2           XYZ                2/4            2/8             Approved
Table Employee (Interactive Report)
ID           Name
1            LMN
2            ABC       -- This row should be with background blue (status applied in holiday table)
3            XYZ       -- This row should be with background green (status approved in holiday table)
All rows without any entry in the holiday table are normal (gray)Is this possible???
How do I do this??
Please Suggest
Thanks.
Edited by: machan on Feb 9, 2010 10:11 AM

For interactive report create your report query to include the status...
so that your report should look like
id name status
Hide status column
apply the inbuilt feature of interactive report to highligh the rows.
Regards,
Shijesh

Similar Messages

  • Classic report - Highlight row

    APEX 4.2.1
    With all the latest and greatest dynamic action and jQuery goodness in 4.2.1, what is the easiest, declarative way to highlight rows in a classic report region (Generic Column Template) based on data condition using values on the row, using #COL# notation? e.g. If SAL > 1000 and DEPT = Marketing, highlight row in red or some such.
    In prior versions, this involved copying the Generic Column Template to one used just by this report and use the (up to 4) Column Templates with a PL/SQL expression.
    Thanks

    Custom report templates are okay if your needs are straightforward. But you said it already, there are only four different flavors to chose from.
    Here is a solution that'll work on all pages if once installed and can be extended to a multitude of visual attributes. Only an example that you may want to adapt to your liking.
    Edit Page, "CSS, Inline", or via Shared Components > CSS files
    td.color1 {background-color:#9F9} /* Table cell gets colored in light green  */
    td.color2 {background-color:#FF9} /* Table cell gets colored in light yellow */
    td.color3 {background-color:#F99} /* Table cell gets colored in light red    */
    /** and so forth, followed by as many declarations as you need... */Page Template, "Function and Global Variable Declaration":
    /** Change the visual appearance of your classic report as you like after it's rendered */
    function customClassicReportDisplay(){
      /** Transfer the color class from the text to the table cell */
      $('td span.color1').closest('td').addClass('color1');
      $('td span.color2').closest('td').addClass('color2');
      $('td span.color3').closest('td').addClass('color3');
      // and so forth, followed by as many declarations as you need...
    }This jQuery code can be simplified, especially the handling of many lines for many colors can still be compacted, which makes it more difficult to understand though.
    Page Template, "Execute when Page Loads":
    /** Perform the function on Page Load */
    customClassicReportDisplay();
    /** Perform the function after Partial Page Rendering */
    $('form').bind('apexafterrefresh', function(){
      customClassicReportDisplay();
    });Here comes the trick. In the SQL statement, you wrap a <span> HTML tag with a different class declaration around each value that you want to color.
    SELECT '<span class="color' || case when some_value > 100 then '2' else null end || '">' || some_value       || '</span>' AS some_value
         , '<span class="color' || decode(some_other_value, 'too much', '3', NULL)   || '">' || some_other_value || '</span>' AS some_other_value
         , '<span class="color' || case when last_value between  0 and  10 then '1'
                                        when last_value between 11 and  50 then '2'
                                        when last_value between 51 and 100 then '3'
                                        else null end                                || '">' || last_value       || '</span>' AS last_value
      FROM ...This obviously makes the SQL a bit more complicated but in my opinion, I think this is a data driven topic and therefore just fine. Hence you say "depending on value ranges I want to change something" - and that belongs to SQL. WHAT you want to do (here: change color) is then up to your JS and CSS declaration. If you shift the SQL code into a view it's better to maintain and won't get spoiled by non-savvy third party developers...
    I know that's not what you originally asked for, because there is no #COL# notation, but for me it's the most flexible solution I can think of under APEX.

  • Highlight row in standard report based on value in column...

    I am trying to highlight rows of a standard report based on the value of the column TICKET_TYPE.
    I have been following the post: Highlighting a ROw in a tablular form based on a column in the row
    but having difficulty. I receive the following error:
    ORA-06550: line 1, column 34: PLS-00201: identifier 'SHRIMP' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    ERR-1025 Error processing PLSQL expression. SHRIMP = 'SHRIMP'
    My report query is:
    select T.TRIP_ID,
    T.TRIP_ID trip_show,
    T.TRIP_ID trip_select,
    T.DAYS_AT_SEA,
    T.NBR_OF_CREW,
    T.TRIP_START_DATE,
    T.VESSEL_ID,
    o.ticket_type ticket_type
    from TRIPS T, one_ticket_type o
    where t.dea_permit_id = :G_DEA_PERMIT_ID and t.trip_id = o.trip_id
    I have created a new template called one-ticket-highlight.
    row tempate 1 = <td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t14data" style="background:red">#COLUMN_VALUE#</td>
    row template 1 condition = use based on pl/sql expression
    row template 1 expression = #TICKET_TYPE# = 'SHRIMP' (**** I have also tried without the quote)
    any thoughts? thanks!!
    Edited by: KEH813 on May 25, 2010 11:10 AM

    Hi,
    You can achive the same using javascript without changing the page template.
    http://apex.oracle.com/pls/apex/f?p=27576:8
    here is the code for the same
    <style>
    .myclass{ background-color:red;text-align:center}
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js "></script>
    <script>
    $(function(){
       $("td [headers='DEPTNO']").each( function(i){
           if($(this).html() == $v('P8_DEPTNO'))  //value of the textfield
               ele = $("td [headers='ENAME']").eq(i)
               ele.removeClass('t20data');   //i'm using theme 20 so t20data .. u need to change this part
               ele.addClass('myclass');
    </script>Regards,
    Shijesh

  • Highlight Rows/Fields in Inetractive Report

    What is the best way to conditionally highlight rows/field in an Interactive Report? I don't want to create filters that the users can see/turn off

    Hello Bob,
    Before you have to think about what happens (or should happen) if a user creates his own highlighting. That will interfere with the highlighting you created....
    But you can set highlighting for a field in the select statement:
    select      "DEMO_ORDER_ITEMS"."ORDER_ITEM_ID" as "ORDER_ITEM_ID",
          "DEMO_ORDER_ITEMS"."ORDER_ID" as "ORDER_ID",
          "DEMO_ORDER_ITEMS"."PRODUCT_ID" as "PRODUCT_ID",
          CASE
             WHEN UNIT_PRICE < 200 THEN
             '<span style="display:block;width:30px;background-color:red;color:darkgreen;">'
             || unit_price
             || '</span>'
             ELSE to_char(unit_price)
             END UNIT_PRICE,
          "DEMO_ORDER_ITEMS"."QUANTITY" as "QUANTITY"
    from      "DEMO_ORDER_ITEMS" "DEMO_ORDER_ITEMS"But remember that the outcome of your query now changed. If you sort upon UNIT_PRICE the <span> tag also is taken into consideration.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • IR highlight row error

    Hi,
    I have two columns in IR
    - Amount to be paid
    - Paid amount
    I would like to highlight rows that have remain amount =0
    so I created a Compute column Name Remain Amount = Amount to be paid - Paid amount
    and created highlight condition where Remain Amount = 0
    but I catched the error when apply the condition
    ORA-20001: get_dbms_sql_cursor error ORA-00904: "Remain Amount null(null)": invalid identifier
    Please help me out.
    Thanks

    Hi,
    Is it possible that one or more of your records doesn't have a value in one/both of the fields? Try using NVL(columnname, 0) to ensure that any nulls are converted to 0 (zero)
    Andy

  • Highlight Row on Tabular Form

    I would like to be able to highlight a row of data on a tabular form based on a certain data column. I have found many posts on here that reference standard reports but is there a way to highlight an entire row of data based on some criteria for a tabular form?
    Thanks!

    Hi all.
    I do everything like it is described in this thread, but it doesn't works! Please, help me to find out the reason.
    So, I have tabular form. I have copied Report Template called "Standard" and renamed it.
    Then I modified it by adding Column Template 2:
    <td bgColor=886666 #ALIGNMENT# headers="#COLUMN_HEADER_NAME#" class="data">#COLUMN_VALUE#</td>
    In Column Template 2 condition I have chosen 'Used Based on PL/SQL expression'.
    Column Template 2 Expression is:
    '#CNT1#' = '1'
    (CNT1 is the name of data column).
    Column Template 1 I leaved as it was in standard template.
    Template of report is : 'Reports region'
    Report template is : 'Template_that_I_modified_from_standard'
    When I run the page, I see all the rows, but no highlighting insead of the condition is true for several rows.
    Please, help me.
    Regards,
    Kseniya.

  • Table Control - Input Enabling/Diabling of Rows based on Condition.

    Hi,
    In the TC, I want to Input Enable/Disable the rows based on Conditions. The First row is input enabled always. But the other rows, (2nd onwards) need to be Input Enabled/Disabled based on some conditions. It is possible to make this working. Can you please provide me a suitable solution for this?
    Appreciate Your Help.
    Thanks,
    Kannan

    Hi Kannan...
    If we are talking about "Rows"...
    then identify based on some conditions the row numbers and in PBO...loop at screen with screen name..set thier input properties and modify screen (make them input only)
    If we are taking into consideration "columns"
    There is an internal structure COLS where we can identify column number of screen name ...or we can take except for one particular column..
    if some condition satisfied....
    loop at screen where screen-name <> "Column which is input'.
    Loop at screen...and make other columns display only.
    modify screen
    endif.
    Regards
    Byju

  • Table Rows with Multiple Conditions Not Showing Up in RH

    Hi everyone,
    I'm currently evaluating TCS2 (Framemaker 9 and RoboHelp 8 on Windows XP) and have come across the following issue:
    One of our FrameMaker source files contains a table in which one of the rows has multiple conditions applied. When one of the conditions is shown in Framemaker, and the others are hidden, the row is displayed in Framemaker as expected. However, when the file is then imported or linked into Robohelp, the same table row vanishes, even though the Apply FrameMaker Conditional Text Build Expression check box is selected in the Framemaker Conversion Settings > Other Settings screen. This only appears to affect table rows - when paragraph text is tagged with the same conditions, it is imported correctly into RoboHelp.
    For example, when Condition B is shown and Condition A is hidden in the Framemaker file, the content appears like this in Frame:
    Unconditional
    Unconditional
    Condition A and Condition B applied
    Condition A and Condition B applied
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    When the same file is imported into RoboHelp, the row with both conditions applied is absent from the table:
    Unconditional
    Unconditional
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    Installing patches 8.0.1 and 8.0.2 did not resolve the issue (and actually caused other, unrelated issues) and I see the same behavior regardless of whether I import or link the FrameMaker document.
    Has anyone else seen this issue? Any help would be much appreciated.
    Thanks
    DaveB

    It just seems that the items I select as align to top in the
    property inspector should force the items to the top of their
    cells, unless I'm missing something.

  • Adobe Form - Hide a table row if a condition met

    Hi Helper
    I am learning how to use Adobe Form - and I am trying to hide a table row if a condition is met by using Formcalc/Jave script - but I donot know how - I was told that I can use "....presence = 'hide'  " property in on of the event(?) but donot know how to write the qualified name for the varable row and what event to use. Could someone please show me how
    Points will be rewarded.
    Thanks

    Hi Liem,
    Here is some more information:
    1)
    Accessing data in Table Cell
    xfa.resolveNode("xfa.data.my_data.tableData[" + this.parent.index  + "].column1").value
    2)  Accessing data nodes in Context
    xfa.datasets.data.my_data.second_node.an_attribute.value == "3"
    I think you will find the WebLog below very useful for your requirements.
    /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    -regards,
    harman

  • Highlight row

    all,
    i'm using the "Background color for current row" property in the report template to define the background color of rows when the mouse is over it. is there a way to define the color of the font for the highlighted row also?
    thanks in advance,
    paul

    See the same example
    http://htmldb.oracle.com/pls/otn/f?p=24317:111
    Modifiying the FG color is not a builtin feature, but you can piggyback on the code generated by the background color feature.
    Add the following to the region footer to override the generated code
    <script type="text/javascript">
    var rowStyleHoverFG = new Array(15);
    function row_mouse_over404667826284618949(rowNode,currentRowNum) {
                    rowActive = 'Y';
                    for( var j = 0; j < rowNode.childNodes.length; j++ ) {
                        if (rowNode.childNodes[j].tagName=='TD') {               
                            rowStyleHover[currentRowNum] = rowNode.childNodes[j].style.backgroundColor;
                            rowStyleHoverFG[currentRowNum] = rowNode.childNodes[j].style.color;
                            rowNode.childNodes[j].style.backgroundColor = '#ffffc1';
                            rowNode.childNodes[j].style.color = 'green';
                function row_mouse_out404667826284618949(rowNode,currentRowNum) {
                    rowActive = 'N';
                    for( var j = 0; j < rowNode.childNodes.length; j++ ) {
                        if (rowNode.childNodes[j].tagName=='TD') {               
                            rowNode.childNodes[j].style.backgroundColor = rowStyleHover[currentRowNum];
                            rowNode.childNodes[j].style.color = rowStyleHoverFG[currentRowNum];
    </script>Change the green color to anything you want.
    Hopefully this becomes a standard feature in the next release so we wont have to hack into it like this.
    Hope this helps.

  • About highlight row

    Hi all,
    I tried to highlight rows in my report.
    <?if@row:position() mod 2=0?> <xsl:attribute name="background-color" xdofo:ctx="incontext">lightgray</xsl: attribute><?end if?>
    But I found if I use this in the default template(using report wizard), it doesn't affect any rows.No any highlight.
    If I added this code in the table that I created by hand or using table wizard, it works well.I can see gray highlight in every second row.
    I made this two templates exactly same, but the first one didn't work.I tried to copy the code to a table which is created by myself, it works.
    Is it a bug or something else?Any suggestions and answers are welcome.I really appreciate it.
    Thanks.

    Yes Dude,
    even i faced some issue like this,
    I think its not bug, due to wrong formatting in the table which we could not see in RTF file,
    that is not working,
    even i did it newly and i got it correct :).
    It has been made so simple for people who are not tech-savy.
    http://blogs.oracle.com/xmlpublisher/2007/08/09

  • Highlight row on mouseover

    See
    http://htmldb.oracle.com/pls/otn/f?p=24317:106
    Selecting a radiobutton and Clicking the Submit button highlights the selected row.
    But when I mouseover the highlighted row, the color changes due to the mouseover stuff defined in the Alternating Row Colors template.
    How can I disable all the mouseover stuff?
    Thanks

    See
    http://htmldb.oracle.com/pls/otn/f?p=24317:111
    The row color changes as you mouseover the rows. As you say, the color is defined in the "Background color for current row" on the Row Highlighting section on the Report Template
    My question was: How do I suppress this mouseover stuff from being generated on the report region? The mouseover code seems to be hardcoded by the HTML DB engine, I didnt see a way to suppress it on the Report Templage page.
    Thanks

  • Highlight Rows and particular columns in table

    Hi,
    My requirement is that I should highlight n (can be any integer value) rows of a table and in each of these rows there are m (1,2,3 or 4 depending on the conditions) columns (All drop downs) that need to be highlighted.
    What I did is as follows:
    1. Made the table multi select and highlighted the rows by using
         wdContext.nodeTable().setSelected(n,true);
       This allowed me to highlight the row.
    2. To highlight the column, I used :
        wdContext.nodeTable().getTableElementAt(n).
        setHdesign(WDTableCellDesign.GOODVALUE_MEDIUM);
    This allows me to highlight the column .
    The problem I am facing is that when both these lines of code are  executed one after the other, the row is shown as selected but this selection overrides the color of the column. The column is then shown in the same color as the rest of the row.
    Can someone suggest a way in which I can both highlight the row and also have the required column(s) of this row in an entirely different color.
    i am using NWDS Version: 7.02.06
    Thanks,
    Himanshu
    Edited by: Himanshu K on Aug 10, 2011 12:23 PM

    Closin as the requirement has changed

  • Display rows according to conditions

    Hi
    I have a requirement where i need to display the rows and corresponding values depending on the condition.
    I need the Count of As and Bs whose aggregate spend sum for transactions in the specified calendar year falls within spend ranges. The ranges will continue to increment by 500 until all As and Bs are accounted for.
    for example there are 20 transactions falling within the zone of 100-500, 10 transactions falling with in the range of 501-1000 this will continue untill all the records are checked. the catch here is the MAX value range that we can get is unknown. it may be 1000, 5000 or 10000. So, the row has to be displayed dynamically along with their corresponding counts.
    each range is displayed in each different rows.
    Any help is much appreciated.
    Thanks,
    Raj

    Could you edit your post (edit button in top right of your post) and put {noformat}{noformat} tags around your data and query.
    So you've shown use what output you are getting, how about showing us, or highlighting which of the rows you want returned so it's clear to us.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Highlighting Rows

    In Mail, the software automatically highlights what are related messages. Is there a way to do something similar in numbers? Perhaps based upon common text within a cell? This would make identification of those similar items in the spreadsheet all appear to have the same color. Yes, there is a way to do conditional formating but it would appear to only be for a single cell and not the entire row. I could of course do it by "hand" but I would prefer to have the software do this at the time of data entry.
    Thanks, Steve H

    Oops, it appears that after Xmas meal my ideas aren't ^perfectly clear.
    As you see, the page 65 offers a conditional formatting which apply only to cells.
    We may use a workaround.
    Tableau 1 is a 'normal' table with an header row.
    I just set its background to none.
    Behind it is Tableau 2 which contains a single column and an header row.
    In its cell A1 I entered the formula:
    =IF(ISERROR(INDIRECT(ADDRESS(ROW(),1,,,"Tableau 1"))),"",IF(ISERROR(SEARCH("chien",INDIRECT(ADDRESS(ROW(),2,,,"Tableau 1")))),""," "))
    The last string contains a 'no_break space' (alt + space).
    I selected every cells of Tableau 2 and applied the rule:
    set background to pink if the cell contains a 'no_break space'
    The result is what you asked for.
    If you look carefully, you will see that Tableau 2 contains one more row than Tableau 1 . This is to check that the formula behaves correctly with such case.
    Yvan KOENIG (from FRANCE jeudi 25 décembre 2008 21:21:37)

Maybe you are looking for