SQL Report Row Highlighting

Hi,
Hoping someone can please assist but I am unsure how to highlight a row within my SQL Report based on a condition, i.e. either a DECODE or CASE statement being true - if so, would like that report highlighted light blue say.
Any help, links,examples would be much appreciated.
Thanks.
Tony.

This should help
Conditional item formatting (color)
you will have to tweak it a bit, but its a way forward for you.

Similar Messages

  • Highlight SQL Report row

    Not an interactive report, just a normal SQL report.
    What I want, and I just can not figure it out, is have a row highlighted if columnA=0.
    So, if I have 80 rows in a report, and value for columnA=0 I want that row highlighted, say a red or a yellow back ground. Can not depending on sorting as users can sort the data, columnA can be hidden or a new column added.
    How would I go about doing that?

    The following solution worked for me:
    Re: Change color of row background when a column in that row meets a condit
    Mike

  • Report row highlight based on a page item

    Is there a way to highlight a report row based on the value of a page item?
    In my case I have a report where the application user requests data in a detail report using a column link in the master report. This loads an id number from my report into a page item (say :P8_ID for example). If this item is null, I want the report rows to all render normally (nothing is selected or the detail report has been closed). If there is an id in that field then I want the row containing the information about that item to highlight (its column link has been clicked selected it to bring up a detail report).
    At first glance, this looks similar to Vikas solution (Change the Report row color when clicked but I am trying to make the connection between what has already been done and where I need to be.

    After looking back, I discovered my value was being set after the report rendered. When I re-organized my calculations and the rest, it worked.

  • Urgent : Deleting a row in a sql report region

    Hi
    I have an SQL report, i must have an icon "delete row", when clicing this icon the row must be deleted from the report,
    what I have do but not sure of this :
    in my query I am containing some html in witch I have an icon, when the user click on this icon, I have to delete the currect row of the record
    How can I reference the currect row, and how can I clear the currect row of a report ?
    thank you

    Off course not.
    You will refer only those primary key column or composite column in your where clause. So, no matter if your table has 15 or 90 columns. All, you need to refer only those key columns in your where clause of your main query and also use them in the sub-query which is connected with IN clause.
    But, i think another approach is showing the use of exists operator. You can check that, too.
    And, in the last post Karthik has shown you the analytic approach which i prefer.
    I gave you my solution without modifying your existing sql. So, that you can understand it without a lot of hard-work and reading. ;)
    I would also request you to check the performance issue on all the solutions which have provided to you by all of us. And, you can choose the best from it after going through the explain plan details.
    So, final ball is in your court. ;)
    Take some breath - and make your wise judgment on it. :)
    Best Of Luck.
    Regards.
    Satyaki De.

  • Sql report, How to access current rows 6 columns data

    I have one page having page items & SQL report having 8 columns.
    First column of report is a link for editing.
    on clicking first column, that record gets displayed on page items, which are opn same page.
    Now my problem is i have used link column of report and set 3 page items value on click of link column.\
    But i need to set values for 2 more page items.
    I tried to create computation & process but not working. i am confused about which process point to select & whether onclick page gets submitted or not.
    I tried to write jscript but not succeeded. I dont know how to get current row id in jscript & different column values of current rowid.
    any help.

    Hi,
    Thanks for reply.
    in 5 items, first three are numeric and last two are timestamp fromtime, totime.
    as I mentioned earlier if i interchange 4 & 5 items i.e. now ITEM4 is totime & ITEM5 is fromtime
    and their values. I get value for totime & not for fromtime. all records contain values for all 5 columns. no null.
    So basically their is no problem in value or data, The only problem is whatever sequence is maintained first 4 items get value & 5th item remains blenk.
    Either I type all 5 ITEM NAMES in one Item name-value pair of link or use all three pairs, 5th ITEM remain blank.

  • How to exclude one or more rows of SQL report from sorting?

    In my SQL report I want to exclude one row from sorting. This row must be permanently at the bottom of the report.
    How to achieve this?
    Regards,
    Al

    Hi Al,
    Check out this thread: Sort within Break? I was looking to preserve a basic sort for break purposes, but the same solution should work for keeping one row at the bottom.
    Let me know if you'd like more details.
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Changing Row color of standard SQL report

    Hi,
    I am trying to follow this post to change the color of a row in APEX SQL report. Change Colour of Row - Oracle APEX SQL Report
    It's a bit outdated, and trying to figure out how to get to this page: http://img7.imageshack.us/img7/4782/columntemplate.jpg in APEX 4.2 where I can conditionally set background color.
    I am using theme 13 (legacy) and made a copy of the report region. Edited it but cannot find an equivalent section of that apex 3.1 screenshot.
    Any help appreciated.

    William Wallace wrote:
    I sure was :) Cheers for pointing it out.
    Just another question, there are 4 options for the #COLUMN_VALUE# which I have background color conditionally (just like in that screenshot) based on one of the column values. The column can be of 1..5 values, however I only have 4 conditions to work with in the template editor.
    So what APEX is doing is since it can't find a 5th matching condition, it picks the very first one and applies it on it (even though the condition doesn't match).
    Is there anyway I can incorporate a 5th option/condition for column templates? Cheers.Not using that technique. There are a couple of options: another template-based approach using a custom named column report template, or using jQuery. I generally prefer the template method as everything runs on the server.
    1. Start by including a column containing the condition logic to generate a class value in the report query:
    select
            , case
                when sal < 1000 then 'low'
                when sal between 1000 and 2000 then 'medium'
                when sal > 2000 then 'high'
              end sal_class
    from
              empThen create a custom named column report template:
    2. Go to: Shared Components > Templates > Create
    3. In the wizard select: Report > From Scratch
    4. Enter/select:
    Name: [Name for this template]
    Theme: [Your current theme]
    Template Class: Custom 1
    Template Type: Named Column (row template)
    5. Click Create.
    6. Click the Status Report link in the Templates report.
    7. Enter the following properties:
    Row Template 1
    <tr class="#SAL_CLASS#"><td>#1#</td><td>#2#</td>...include a cell with a column substitution for every column in your report...</tr>i.e. the column with the conditional logic in the query is used to apply the required class to the row.
    Before Rows
    <!-- Copy the Before Rows definition from the Standard report template for your current theme and paste here -->
    <tr><th>#1#</th><th>#2#</th>...include a header with a column substitution for every column in your report...</tr>
    After Rows
    <!-- Copy the After Rows definition from the Standard report template for your current theme and paste here -->Add CSS to style the rows:
    8. Edit the Page CSS Attributes for the report page:
    Inline
    tr.low td { background-color: yellow; }
    tr.medium td { background-color: white; }
    tr.high td { background-color: red; }9. Change the report to use the new template.
    For the alternative jQuery approach, Tom created an example for this thread: +{thread:id=2487955}+

  • Multi row update in sql Report

    Hi All,
    I had created a Updatable SQL report , and the SQL query fetches data from four table and JOIN condition also exists.
    Currently I can Update only one row at a time but what I want is to update multiple row at same time. Is this possible without TABULAR FORM ?
    Thanks
    Dikshit

    Hi
    The whole concept of a Tabular form is that it shows a table of updatable rows. These can be modified and then when the user clicks "Update" all the rows that have been changed will be updated on the base tables.
    There is no wizard to do this any other way. However there is something in APEX called htmldb collections. These are essentially virtual tables that can hold data temporarily in memory. You could consider using a form to update each record individually, then when the user clicks "Save" it writes the updated form data to an htmldb collection. The user could then click "Update All" and all the data in the htmldb collection could be updated on the base tables.
    htmldb collections are well documented in the HTMLDB Users Guide.
    I hope this helps,
    Cj

  • SQL Report - PDF Report Printing. How to show one row per page?

    Hello
    I have successfully created a simple SQL Report.
    Than I enabled Report Printing to PDF (default Report Layout).
    Export to PDF is working good by default.
    Now I want to see one report row per one PDF page. Is it possible?
    How I can change the amount of rows per PDF page using default report layout?
    I tried to create a User Layout with MSWord Plugin. it's quite suitable for data forms.
    But I still did not find a way around for my question.

    I would create an User Layout (.rtf) with MSWord. Load your XML data and use the table wizzard to put the fields in your document.
    Put this code after your last field and before the 'E' (= <?end for-each?> tag):
    <?split-by-page-break:?>

  • Highlight an item in a SQL-report

    Hello,
    I have a table in which items are stored with a column "name" and a column "correct".
    I need to highlight an item (put backgroundcolor in red) in a SQL-report based on the fact if the value of the column "correct" of the item is False. I don't know how I can do this? Can anyone help?
    Thanks in advance,
    Bram.

    Hello Bram,
    Something like:
    select "DEMO_PRODUCT_INFO"."PRODUCT_ID" as "PRODUCT_ID",
          CASE WHEN PRODUCT_AVAIL='N'
             THEN '<span style="background:red">'||product_name||'</span>'
             ELSE product_name
             END  "PRODUCT_NAME",
          "DEMO_PRODUCT_INFO"."PRODUCT_AVAIL" as "PRODUCT_AVAIL"
    from "DEMO_PRODUCT_INFO" "DEMO_PRODUCT_INFO"Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Loop Through Rows in SQL Report.

    Hello Everyone,
    I've been creating a very different application, and I've run into quite the roadblock.
    Let me give you a breif about the problem.
    I have a form that needs to be dynamic and thus is created at runtime.
    I have used the APEX_ITEM and a SQL SELECT CASE to create a dynamic report.
    For example if the DATATYPE column in my table says DATE, I create an APEX_ITEM.DATE_POPUP, if it says CHAR i create a textbox, and if a column called
    LOV is populated APEX_ITEM.SELECT_LIST_FROM_QUERY using the number value of the LOV to query a List of Values from another table.
    Now this brings me to say in a single column of the there could be different data_types. meaning the multi-row update functionality with apex will not work.
    Getting the data to display is easy. However saving the updates is a different story.
    Which brings me to my question. Does anybody know of way in which you can loop through each row in a SQL Report on APEX and assess each row individually.
    I'd like to accomplish something like this
    LOOP
    MyUpdateProcedure(currentrow_id,currentrow_datatype, currentrow_value)
    Go to Next Row in Report
    END LOOP;
    Pretty simple in theory? Do we have an APEX expert out there who could give me a hand with this?

    Codes,
    It sounds to me like you could add a hidden field to tell you what you need to know in order to determine the column to update.
    Assuming it was created using the parameter p_idx = 50 and contained the names you provided (eg DATA_DATA) and your primary key is created using p_idx = 1 then you could add the logic for the update into an on submit process something like so
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    CASE apex_application.g_f50(i)
    WHEN 'DATA_DATA' THEN
    -- run the update against the data column
    WHEN 'CHAR_DATA' THEN
    -- run the update against the char column
    etc.
    If the multi-type column is created with the apex_item api using p_idx = 2 then you just refer to it in the loop as apex_application.g_f02(i) and the primary key is apex_application.g_f01(i).
    I hope this helps.
    Greg

  • Color report rows based on a value in that row

    I would like to Color report rows based on a value in that row.
    For examplle with the "EMP" table:
    I would like job=MANAGER to be red and job=CLERK to be green etc etc
    The other example I found only had the option of one color either the highlight or the default color.
    I am looking for a way to do multiple colors.

    Hi,
    In the row template, you can use #1#, #2#, etc to indicate where a field in the report needs to be output. This does not have to be plain text - ie, you can use it within style tags if you like.
    So, take a query like:
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    DECODE(DEPTNO, 10, 'green', 20, 'red', 30, 'cyan', 'white') BG_COLOUR
    FROM EMPYou get columns 1=empno, 2=ename, 3=deptno and 4=bg_colour. In the row template, you can then do:
    Before Rows setting (sets up the table):
    &lt;table&gt;
    &lt;tr&gt;&lt;td&gt;ID&lt;/td&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Dept&lt;/td&gt;&lt;/tr&gt;After Rows setting (closes the table):
    &lt;/table&gt;Row Template 1 (used for ALL rows):
    &lt;tr style="background-color:#4#;"&gt;&lt;td&gt;#1#&lt;/td&gt;&lt;td&gt;#2#&lt;/td&gt;&lt;td&gt;#3#&lt;/td&gt;&lt;/tr&gt;Then, for every row, the colour that has been calculated using the DECODE function will be used in the style tag to colour the background for the entire row.
    How you determine the colours is up to you. I've used DECODE here, but you could use a field on the DEPT table to hold this and use this in your SQL statement.
    Andy

  • APEX-BUG? Row Highlighting and Mouseover

    Hello Experts,
    I build a classic report on APEX 4.0.2 with different column templates depending on the dep_id-row. (If dep=30 I want a green row)
    You can see this at [http://apex.oracle.com/pls/apex/f?p=12579:5:164720075315678:::::|http://apex.oracle.com/pls/apex/f?p=12579:5:164720075315678:::::]
    After F5 all columns for dep 30 are in green. If you move the mouse over the report the rows become grey. After next F5 you will again see the green background color.
    The template is defined as follows:
    Column Template 1
    <td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t20data" style="background-color:#EEEEEE;">#COLUMN_VALUE#</td>
    Column Template 1 Condition
    Used Based on PL/SQL Expression
    Column Template 1 Expression
    #DEPARTMENT_ID# <> 30
    Column Template 2
    <td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t20data" style="background-color:#8FE98F;">#COLUMN_VALUE#</td>
    Column Template 2 Condition
    Used Based on PL/SQL Expression
    Column Template 2 Expression
    #DEPARTMENT_ID# <> 30#DEPARTMENT_ID# = 30
    I'm shure that this already worked fine.
    Is there a way to use Row Highlighting together with Column Templates ?
    Thanks for any idea!
    Frank
    Edited by: frank_schmidt on 23.02.2011 02:01
    Edited by: frank_schmidt on 23.02.2011 07:41

    I can see that when the mouse moves over a row, the row cell(td) are applied a background-color, this is not via a class but it is set directly at the column level.
    So I guess it is some JS code that does it.
    If that be the case, irrespective of the css classes or inline styles you specify for the column,they would be overridden(element.style > class ) and overwritten(td.backgroundcolor is set directly). So JS code that does this has to be disabled first.
    If you remove the 'highlight-row" class from the table row( tr) element either in the template or if its for just one report, do it directly in the Page using JS by
    $('tr.highlight-row').removeClass('highlight-row');Now inorder to get the row highlighting(without removing the original styling on mouseout), change the template to use a class and move the background color under the class( background-color:#8FE98F).
    If you highlighting to work with FF alone, you can define the :hover pseudo class
    {code}
    tr.highlight-row td:hover{
    background-color:#CDCDCD;--use the mouse over color
    {code}
    But if it has to work with all browsers, you would have to rewrite the row highlighting JS

  • Row highlighting - variable substitution?

    Hi
    Report templates are great except that the Row Highlighting options take literal values.
    Is there (at 3.0.1) any way to vary the background color for current row dependent on a CSS style or other variable?
    Is there (please...) any intention to support CSS styles or a substitution variable (or application item reference) in these settings in a future release?
    Thanks
    John

    Bump again. Variable ROW-level formatting would be REALLY nice. And not just the {span] tag, but include row-level changes for both cell- and text-based attributes such as cell borders, cell background colors, font size, font weight, font color, etc. Would be best if one could create a pseudocolumn in the SQL and have the row use the specified CSS value, ie
    This SQL query
      select CASE(dept_id)
            when 1 then 'mktg'
            when 2 then 'sales'
            when 3 then 'admin'
        END CASE as CSS,
       emp_id, emp_nm, dept_id
        from EMP;This could be paired with a stylesheet in the page header that looked something like:
    <style type="text/css">
    tr.sales {text-align: center, font-weight: bold; color: #FF0000; border: 1px solid black;}
    tr.mktg {text-align: right, font-weight: bold; color: #32CD32}
    tr.admin {text-align: right, font-weight: bold; color: #00FF00; border:1px solid green;}
    </style>Then when rendering the page, it would apply the row-level css to the {tr} tag when building the table.
    What say you?
    Edited by: blarman74 on Apr 30, 2010 12:25 PM

  • Pop up text on clicking link on a sql report

    Hi
    I'm using apex 3.2
    I've a sql report like below
    taskId(edit) Task_details Notes owner .....
    What I want to do is if I click on taskId which is edit link ,pop up text box should open where I can add notes to that row.
    How can I achive this?
    Thanks in advance

    Hi,
    Take a look at the following blog posts and see if they can help you get what you are looking for (there are sample applications in them showing the functionality):
    http://monkeyonoracle.blogspot.com/2010/07/modal-pop-up-with-dynamic-actions.html
    http://www.danielmcghan.us/2008/12/popup-in-report.html
    Hope that's useful for you.
    Regards,
    Sergio

Maybe you are looking for