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.

Similar Messages

  • How to color single column cells with different colors in classic report based different conditions

    Hi ,
      Am working on Oracle Apex 4.2 version. Am trying to generate a  classic report with different cell colors based on the conditions.
      I tried the solution provided in the below link.
      https://forums.oracle.com/message/9518723#9518723.
      I tried the same query given in that link.
       SELECT e.*,
      CASE
        WHEN sal < 1000
        THEN 'red'
        WHEN sal BETWEEN 1000 AND 2000
        THEN 'yellow'
        WHEN sal > 2000
        THEN 'green'
      END the_color
    FROM emp e
      And, I hidded the column 'the_color' in Report Attributes,
              the Column Template1 has the code , <td #ALIGNMENT# headers="#COLUMN_HEADER_NAME#">#COLUMN_VALUE#</td>.
    After this, what are the steps did I miss here. Because am not getting the report which I need.
    Kindly do provide solution.
    Thanks,
    yashu.

    SAL column values should visible with different color based on the conditions. Same way i did in my report it was working for me. Please refer the below links for more information,
    https://forums.oracle.com/thread/1047891
    http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:351800346145832
    Thanks
    Lakshmi

  • Bold a single row in a Report based on SQL Query

    Should be easy? So, how do I bold a single row in a report based on SQL query without creating a new template or writing Java for the page? What is the Tabular Form Element "Element Attributes" field for? Or what am I supposed to put in there to make it do anything?

    One way to do this is to add a hidden column to your report which contains the formatting value, for example:
    select empno
    , ename
    , sal
    , decode(empno,1,'font-weight:bold','font-weight:normal') style
    from emp
    Hide the STYLE column.
    Then you can use this column for each column in Column Formatting > HTML expression in this way:
    <span style="#STYLE#">#SAL#</span>
    Unfortunately you have to do this for each colum you want to appear bold.
    good luck,
    Dirk Dral

  • Refresh classic report based on select list value selected

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

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

  • Colourfull  row in classical report

    Hi,
    I have classical report. I have to do colour full to  row in report. how i can set green colour for a row in classical report.
    Thanks & regards
    Vedant

    refer  oracle apex - Colour report rows that contain the same product name - Stack Overflow
    helps you
    Pars

  • Show / Hide DOWMLOAD link in classical report based on user rights

    Hi,
    using apex 4.1.
    How i can display or hide download link in classical report based on user rights .
    The User who has download rights ,can download the data from classical report Otherwise it should hide.
    I have passed the code in authorization scheme in shared component as named "VIEW"
    DECLARE
    VNAME VARCHAR2(1000);
    BEGIN
    SELECT PAGE_NAME INTO VNAME FROM APEX_APPLICATION_PAGES WHERE PAGE_ID = :APP_PAGE_ID AND APPLICATION_ID = :APP_ID;
    return GET_ADMIN_STATUS_VIEW_NEW(:APP_USER,VNAME);
    END;How i can call "VIEW'' name in download link.

    Right click on the export link, select copy url. Create a button with redirect to URL. Use that URL (or at least everything with and after f?p). Bind rights to the button.
    Or create a second identical report with different rights, give one export enabled and one disabled. The first is better, the second is easier :)
    Edited by: Joni Vandenberghe on 8-feb-2013 5:08

  • 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

  • Radio group in classic report based on another column on the same row.

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Application Express 4.1.0.00.32
    How can I have a radio group column based on an LOV utilizing another column on the same row of the report?
    For example: what if I had a survey application and depending on the likert scale that was assigned to the question there would be different possible answer choices:
    Question 1 on row 1 of the report: The class instructor was friendly?
    Likert scale choice is Agreement.
    Choices on Radio Group: Strongly Agree, Agree, Undecided, Strongly Disagree
    Question 2 on row 2 of the report: The class offered good materials?
    Likert scale choice is Quality.
    Choices on Radio Group: Excellent, Below Average, Average, Above Average, Excellent
    The radio group can change per row depending on the Likert scale assigned to the question which is assigned to a different column on the row.
    Can LOV utilize the column? :
    SELECT scale_text
    FROM scale_choices
    WHERE scale_category_choice_id = 2 <<= this would be the Likert scale identifier
    ORDER
    BY display_order

    Here is the answer:
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
    p_idx IN NUMBER,
    p_value IN VARCHAR2 DEFAULT NULL,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 DEFAULT NULL,
    p_show_null IN VARCHAR2 DEFAULT 'YES',
    p_null_value IN VARCHAR2 DEFAULT '%NULL%',
    p_null_text IN VARCHAR2 DEFAULT '%',
    p_item_id IN VARCHAR2 DEFAULT NULL,
    p_item_label IN VARCHAR2 DEFAULT NULL,
    p_show_extra IN VARCHAR2 DEFAULT 'YES')
    RETURN VARCHAR2;

  • 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

  • Whole row of classic report clickable

    Good morning,
    I tried this solution to make a whole row in a classic report clickable:
    {message:id=9656396}
    It worked pretty well but I only on the first open page of a multi page report. If I go to the next or previous page the rows are not clickable anymore. I tried to use livequery but ended up with clickable rows on every second page:
    The report loads with clickable rows. First time I click 'next' the rows are not clickable, second time they are clickable again and so on.
    My livequery statment looks like this:
    $(document).ready(function()
      $('table tr .myClass td').livequery(function(){
        $(this).css("cursor","pointer");
        return false;
    });Can anyone please give me a hint what I'm doing wrong here and how to solve my Problem?
    Cheers,
    Andreas
    PS: How can I format the sourcecode in this forum?
    edit: format

    Hi,
    you can use the following (here I assume the template uses <tr #HIGHLIGHT_ROW#>) :
    CSS :
    tr.highlight-row td:hover {
         cursor:pointer;
    JQuery :
    $('#your_report_id').delegate('tr.highlight-row', 'click', function () {
         do_what_you_want_on_row_click();
    });

  • Trouble displaying all rows in classic report

    Hi,
    I have a classic report which pulls out data based on item in bind variable (which is a select list). Some entries should have about 200 rows but the page only shows 15 rows.
    I have tried setting pagination to none still dont get to see all rows. Here is my setup for pagination for the table: http://i.imgur.com/iQoG0.png
    If I get my pagination back, then I get to see all rows by clicking next but I need to show all rows in the page. Is there anything else I need to be doing aside from setting pagination to none?
    Apex 4.1.1
    Cheers

    Hi,
    >
    I have a classic report which pulls out data based on item in bind variable (which is a select list). Some entries should have about 200 rows but the page only shows 15 rows.
    I have tried setting pagination to none still dont get to see all rows. Here is my setup for pagination for the table: http://i.imgur.com/iQoG0.png
    >
    The Number of Rows item determines the number of rows on page. You have set it to 999, so that looks ok.
    >
    If I get my pagination back, then I get to see all rows by clicking next but I need to show all rows in the page. Is there anything else I need to be doing aside from setting pagination to none?
    >
    Add a Reset Pagination Process at Processing point "Before Regions" (or anywhere before that) and you will be ok.
    The browser cache does not clear the pagination on its own at times.
    Cheers,

  • Adding the Checkbox for each row in classic report

    Hello,
    I have created classic report with checkboxes in each row and added the On-Submit process, BUTTON CONDITIONAL, to determine the behavior of the checkboxes. The PL/SQL process is suppose to delete the selected row from database.
    I am getting the Success message, but When I check the database, the row still persist in the database.
    PLSQL CODE:
    FOR i IN 1..apex_application.g_f01.count LOOP
    DELETE 
    FROM
      registry 
    WHERE
      reg_id = apex_application.g_f01(i);END LOOP;
    ORACLE APEX: 4.2
    Thank you

    Hi ApexNewLearner,
    Try this
    DECLARE
    j number;
    BEGIN
    FOR i IN 1..apex_application.g_f01.count LOOP
      j := apex_application.g_f01(i);
      DELETE FROM  registry
      WHERE  reg_id = apex_application.g_f01(j);
    END LOOP;
    END;
    or better try to replicate your issue on apex.oracle.com , that is easy for users to investigate the issue and give you appropriate solution.
    Hope this helps you,
    Regards,
    Jitendra

  • 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

  • Bug in Classic Report based on Function?

    As a simple example, suppose I want a classic report in which I can change the sort field by selecting from the item P1_SORTFIELD. In Apex 4.2 I was able to implement the report using the PL/SQL function
    return 'select ENAME, SAL from EMP order by ' || :P1_SORTFIELD;
    I cannot do this in Apex 5 on my apex.oracle.com workspace. I either get an "SQL command not property ended" runtime error if I use generic column names, or "not all variables bound" parse error if I don't.
    My real application uses generic column names, so I am most interested in a solution to that.  For example, I tried creating a report having the source
    return 'select ENAME from EMP order by ENAME';
    If I run it using generic column names I still get the "SQL Command not properly ended" runtime error.
    Is this a bug??
    Ed Sciore

    Ed Sciore wrote:
    As a simple example, suppose I want a classic report in which I can change the sort field by selecting from the item P1_SORTFIELD. In Apex 4.2 I was able to implement the report using the PL/SQL function
    return 'select ENAME, SAL from EMP order by ' || :P1_SORTFIELD;
    I cannot do this in Apex 5 on my apex.oracle.com workspace. I either get an "SQL command not property ended" runtime error if I use generic column names, or "not all variables bound" parse error if I don't.
    My real application uses generic column names, so I am most interested in a solution to that.  For example, I tried creating a report having the source
    return 'select ENAME from EMP order by ENAME';
    If I run it using generic column names I still get the "SQL Command not properly ended" runtime error.
    I cannot reproduce the same error messages in my workspace on apex.oracle.com.
    The basic problem here is that the function body will not return a syntactically correct SQL query if the session state value of P1_SORTFIELD is not a valid sort expression for the query. This will always be the case when the region source is validated in the App Builder, and also if P1_SORTFIELD is null at runtime. The solution is to ensure that the function body always returns a valid query irrespective of the value of P1_SORTFIELD:
    return 'select ENAME, SAL from EMP' || nullif(' order by ' || :p1_sortfield, ' order by ');
    Here is another weird thing. I looked at my Apex 4.2 application that got transferred over to Apex 5. The region that does the dynamic sorting still works. But now I just created a new region on that page that has the same source, and as far as I can tell, exactly the same properties. And this region gives me the runtime error. The URL is apex.oracle.com/pls/apex/f?p=80034:33 if that helps.
    Given that I can't reproduce your results based on the information provided, I think we'd need access to the app in your workspace in debug mode to investigate this fully.

  • Rows in Classic Report

    Hi
    we have to place Now of Rows Option in Classic Report,
    Like in Interactive Report
    Select Creteria We can Choose Rows
    any idea Please
    many thanks

    Why not just change it to an interactive report?
    Or you could change your report source to something like this...
    SELECT *
    FROM (SELECT /*+ FIRST_ROWS(n) */
                 a.*, ROWNUM rnum
          FROM ( -- your query goes here
               ) a
          WHERE ROWNUM <= :P_MAX_ROW)
    WHERE rnum >= :P_START_ROW;Obviously you could remove the start row and outer query if you wanted, and you would need to create items for the 2 bind variables...
    Cheers
    Ben

Maybe you are looking for

  • Open close sub vi front panal

    I have a sub vi which returns a true or false. I'm using a case statement to open and close the front panal of the sub vi.  If true I'm using a invoke FPpen to open the sub vi and if false I'm using an invoke FP:close to close the front panal. The su

  • Help with submit button, signatures and locking fields

    https://acrobat.com/#d=sCcToPsLqquP0uePmVL1pQhttp://https://acrobat.com/#d=ZsRL5CeME*4iV3VHnvUFXw Well here's a doozy for ya. I have no idea what I'm doing as you will be able to see when you look at my form. What I want to happen is to have the user

  • Report Painter - Forms

    Hi Gurus, I needed to develop report painter report for WBS element, where I need to compare two plan versions against  the actual. The report out put is done. User need to enter two plan version as input in the selection,  for both the plan versions

  • Background execution - VL06O

    Hi All, We have a peculiar problem. User is able to view data for VL06O in foreground but when the report is run with the same parameters in the background the values do not show up. The batch job shows status "complete" and no errors appear. Thanks

  • Simple Stream/String Manipulation

    I have a data stream that I am feeding into a method as a string, connects to a DB2 database and inserts the values contained in the string. Here is what the string looks like: ==SS39939294== 03012|39|33|32|2|232|9995 0333|34|007|32|2|7|95345 0392|39