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}+

Similar Messages

  • Change  row color on alv

    hi
    how can i change row color on alv.

    Hi
    thanks your answer  Uday Gubbala         
    i was examinated this link  [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abapWebDynproALV-ChangeCellColourbasedonContent]
    but i don't  do   this row  wd_this->m_alv_model = lo_value. error message : m_alv_model unknow.
    and this sample change column color but i want to row
    Thanks.

  • Re: Is it possible to change row colors on array fields ors

    HI Martin!
    Yes, it is possible to change row colors on array fields.
    I have attached a PEX (tools.pex) which has an object which changes FillColor
    and PenColor for Arrays. The PEX has it's own test window, so you can try
    various combinations. (There are a few other Objects in the Project which are
    not relevant
    I'm not sure that you can change colors on individual choices in a scroll list.
    I haven't tried playing around with it.
    The test window actually changes the color of scroll lists as well.
    The object keeps track of which rows have changed color, same with pen color, so
    that when you scroll it keeps track of which rows are a different colors.
    The pex is self-contained, just import the file and do a test run.
    Please let me know if you have any problems.
    -later
    -labeaux
    Is it possible to change row colors on array fields or scroll lists?
    I need to create a list field that will allow me to dynamically change the
    fillColor and/or penColor attributes of individual rows. (I just want to
    highlight the rows, and those seem to be the obvious attributes...) It appears
    you can't do that on scroll lists (the elements are list elements, and don't
    have those attributes) and I can't figure out how to do it on an array field
    either. Any ideas for how to accomplish this?
    -Martin ([email protected])

    FreshWebmuse,
    Version 2 of iCal has the "Group Calendar" feature. It was released as part of Mac OS X v10.4, and if you really want/need that feature you will have to upgrade to Tiger.
    ;~)

  • Changing row color of a report

    Apex version 4.1,
    Hi Experts,
    I have a simple report and one column holds a flag value (either 1 or 0). all the rows which has the flag value as 1 should be displayed in different color on the report. How can i do this custom row coloring ?
    Really appreciate if someone can help me on this,
    Thanks guys.
    Kurubaran.

    Apex-Ape wrote:
    Really appreciate if someone can help me on this,
    You can help yourself on this&mdash;and most other questions&mdash;by searching the forum before posting to find the numerous previous answers, such as +{thread:id=2292619}+

  • Changing Row Color In JTable !

    Hi friends
    I have two JTables. The first one has 7 columns and 10 rows (with data) but the second one is empty.
    The user can choose one row from first table and by pressing the ((copy)) button , copy that row to the second table. Is it possible to change the color of those rows(in the first table) that been copied to the second table. I mean if the user choose a row and copy then to the second table, the color of this row wold be changed.
    Can anybody help me with that??
    Thanks

    I think you are heading in the wrong direction here... you want to create a brand new DefaultTableCellRenderer and override the getTableCellRendererComponent method...
    public class MyRenderer extends DefaultTableCellRenderer {
      public Component getTableCellRendererComponent(JTable table, Object value,
                              boolean isSelected, boolean hasFocus, int row, int column) {
                  JLabel lbl = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus,
                               row, column);
                  //now I can change the background color depending on the row...
                  if (row == xxx) lbl.setBackground(Color.red);
    }Then use your new class on your table...
    <table.setDefaultRenderer(Object.class, new MyRenderer()); //the class must match what you TableModel returns for getColumnClass();Hope this helps,
    Josh Castagno
    http://www.jdc-software.com
    Hope this helps

  • Change row color

    I am developing an application using Oracle 6i Forms and Developer,and i am new to it.
    I have a datablock on a canvas and i am trying to do sth:
    When the user clicks on a row of the datablock,the entire row background color should change to green and all the other rows to color grey.
    What trigger should i use to make this?
    Thanks

    Indeed,
    The block level will also change the color of buttons.
    In case of the rest of rows gray, what you can do is by default set the background color to gray and override it with the current record visual attribute at block or item level.
    Regards,
    Tony
    PS: You can also use the CURRENT_RECORD_ROW_BACKGROUND_COLOR to set the background color of the selected row.
    Message was edited by:
    Tony Garabedian

  • Changing row color according to condition statement

    Hi,
    Is there a way that I can color a row or field in a report according to a condition? For example, can I color red all rows where an amount is over 1,000? Or can I just highlight the field that answers to the criteria?
    Thank you.
    Leah

    Hi,
    The row cannot be colored
    just the cell that match the criteria
    tamir

  • Dynamically changing row color in an ADF table?

    Hi,
    I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can anyone please let me know the code for dynamically changing the row color of an ADF table?
    Thanks,
    Vik

    well you can use EL on af:column inlineStyle property to change the color on condition
    e.g
    inlineStyle='#{(row.SelectedRow)?"background-color: Silver":""};a example can be found here it is changing color based on Checkbox selection http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html

  • Changing row color through a drop down box????

    Is there a way I can get a table row to change color based on the value of a drop down box? I have 3 color options in the drop down list: yellow, green, red. I'm trying to get it so when I select a color in the list (like for example green) the whole row of that table fills with green. I'm searching for an answer and I can't find it. Any help would be greatly appreciated Thanks :)

    Check the code very carfully, you appear to have left off a number of quotes:
    // force to white in case there is no match following
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,0";
    //changes row to red
    if(LeaveType.rawValue == 4) {
    Page1.Shape.LeaveType.border.fill.color.value = "255,0,0";
    //change row to Green
    if(LeaveType.rawValue == 3) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,128,0";
    //change row to Blue
    if(LeaveType.rawValue==2) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,255";
    //keep row white
    if(LeaveType.rawValue == 1) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,0";
    Or you could use the "swithc(){}" statement:
    var FillColor = "0,0,0"; // white
    switch(LeaveType.rawValue) {
    case 4:
    FillColor = "255,0,0"; // red
    break;
    case 3:
    FillColor = "0,128,0"; // green
    break;
    case 2:
    FillColor = "0,0,255"; // blue
    break;
    case 1:
    break;
    default:
    app.alert("Unkown Leave Type: " + LeaveType.rawValue, 1, 1); // identify unkown leave type
    break;
    Page1.Shape.LeaveType.border.fill.color.value = FillColor;
    You might want to also open Acrobat and check the Debugging Conosole for errors.

  • Display max rows returned by a sql report

    Hi all
    how can i display the sql%rowcount from a report based on a sql-query. Is there a substitution string available to show me the "rows(s) 1-n of ??" in the pageination link?
    Thanks
    Martin

    Greg :
    Of course, I can not use the same query twice, I have many reports in many pages, if I do it with a select count in another query...it will mean that if I have 3 reports in a page, I will run 6 queries instead of 3.
    Another thing: If I use : max rownum in the report query, I will get the number of records but in a report column, and I want this value to be displayed of out the report....in this case, how can I get this column value in a page item ? have you an idea ?
    Thanks a lot.

  • [php+mysql] nextensio list: how to change row color based on field content?

    Hi all
    I have a nextensio list on a page.
    is there a way to change the background color of a whore row based on
    a specific field content?
    example I have a field containing the values 0 or 1.
    If the field content is 1 the row background color should be RED.
    ANy suggestion?
    TIA in advance.
    tony

    DataBoundAPI's you can refer to achieve this.
    Search for OLD threads also. Here are some links:
    Can we colour the rows in the column of a table
    Advanced table row font color- result based change.
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Changing row color when ever will select that row.

    Hello,
    After applying themes which property do i need to to change so that the color of the row will change from from dark yellow to some light color when ever i select that perticular record
    in table UI Element.
    Thanks & Regards
       Kiran

    Hello Kiran,
    In theme editor go to Complex Elements -> Tables -> Side Heading Selected Cells -> Background color of Primary selection.
    Hope this helps.
    Cheers-
    Pramod
    award points if helpful.

  • Changing Row color when ever I select perticular row

    Hello,
    After applying themes which property do i need to to change so that the color of the row will change from from dark yellow to some light color when ever i select that perticular record
    in table UI Element.
    Thanks & Regards
       Kiran

    Hi Kiran,
          After setting the theme, you will have to change the following property in theme editor.
    Complex Elements -> Tables -> Selected Cells.
    a) Background Color of Primary Selection
    b) Background Color of Secondary Selection
        I hope this helps.
    Regards,
    Uday.

  • Number of Rows Displayed in a SQL Report Region

    Hi,
    Just wondering whether it is possible to control the 'Number of Rows' displayed under the 'Layout and Pagination' section within the Report Attributes page.
    Basically need to know if I can programmatically control this or even better, can it be customized by the user as the user may want to see say 15 rows, 200 rows or 'All' rows of a certain region on the page. FYI, I have three different report regions on one page and want to give the user the flexibility to modify the number of rows displayed per region.
    Thanks.
    Tony.

    Tony,
    you can find that in this how-to document:
    http://www.oracle.com/technology/products/database/htmldb/howtos/howto_report_rownum.html
    Denes Kubicek

  • Changing row colors in crosstab with static structure

    Hello,
    I've a crosstab that consists of several key figures (static structure) in the rows and the fiscal period in the columns:
    _____________|__January | February | March | .....
       Key Figure 1   |    3
    + Key Figure 2   |    4
    = Sub Total        |    7
    + Key Figure  3  |    1
    = Overall Total   |    8
    Now, I'd like to assign different (background) colors to the key figures resp. totals in the rows in order to make them better readable. Is this possible?
    I've already had a look at the custom style-sheet method described in http://scn.sap.com/community/businessobjects-design-studio/blog/2013/07/21/design-studio but that's not the same what I'd like to do...
    Does someone have an idea on how to realize this?
    Thanks and best regards,
    Patrick

    I have a question related to your last post.
    I have a crosstab layout. I have setup custom CSS for my learning purposes. I am currently using 1.4 in a local install on my PC.
    Here is the CSS I am using for the layout.
    .sapzencrosstab-DataCellAlternating {
    background-color: #CCFFCC !important;
    .sapzencrosstab-DataCellDefault {
    background-color: #EAF2D3;
    /* This defines how tall the rows will be in the cross tab layout*/
    .sapzencrosstab-DataCellContentDiv {
    height: 40px;
    /* This formats the Task Count with a gradient yellow*/
    .sapzencrosstab-DataCellTotal {
    font-weight: bold;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#E6E600',GradientType=0); background-color: rgb(229, 234, 243); !important;
    With the above CSS, I can get the Overall Result count to show up in yellow.
    My goal is to get the cell that contains the Overall Result text to show up formatted the same way the count is formatted. (Gradient Yellow)
    I looked at, and tried your solution, but it did not work for me. Is there a better way to do this?
    Thanks,
    Lloyd

Maybe you are looking for

  • Image cache not working with Firefox and apex

    Hi, I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change. I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-se

  • What are the objects in APPLSYSX tablespace

    If it contains indexes only, is it possible to DROP/Recreate the tablespace and rebuild the indexes? These queries returns null. SQL>select owner,table_name from dba_tables where tablespace_name='APPLSYSX'; SQL>select owner,index_name from dba_indexe

  • Gift card usage

    I am looking for how to use a gift card in the itunes store. I have an acocunt already, and have no problem purchasing songs with a credit card, but do not see anywhere to enter in the gift card. I looked at help and it says it should be in the accou

  • Bluetooth Headset and Vista

        I have a Samsung SBH170Bluetooth Headset, a T60 and Vista Ultimate operating system. The Computer finds the headset and it sends a test signal to the headset. How do I get sound from movies or streaming audio or music files to play in the headset

  • Secure Variables

    Hi All, I noticed an issue with 'Secure variables' in our queries. We have a char. called 'Seller' in our queries. A secure variable 'ZSLLR' was created on this char. in one of the queries created against a cube. Then a query was created on an Info o