Changing the color of sortable columns in reports

Hi all,
In my Report template (custom made) I have my headers as purple with white text, which is all good except when I make it sortable, it turns all black and hard to see against deep purple background.
Is there a way to retain (or change the column header to white) when I mark a column for "sort"??
Cheers.

In the same way you've changed the colours from the default, you should be able to dictate what colour is used when the field is sorted.
Check what classes are applied on your sorted column and adjust the CSS as necessary.

Similar Messages

  • How can I change the color of a column header?

    I need to change the color for some column header, how can I do it in webdynpro ABAP? Is it possible?

    hi ,
    i have used in alv....
    <font color="RED">text</font>
    but i think it is not possible to change the colour in table ui element.
    regards,
    sahai.s

  • How can I change the color of chart in webi report

    Hi :
      I create one Webi report including one table and chart  In BO 4.0.
    The chart  display  the relationship between sales-amount and profit amount . I do not want to use the default color but want to specify the red color for sales-amount and yellow color for profit amount . How can I do it ??
    Thanks Very Much
    Emily MA

    Hi,
    You can change the color very easily. It's simple & straight forward which I found it couple of days back. (Sometimes simple things are hard to find :-p )
    Select the area in the Chart that you want to change color, then go to Format > Style > Background color. Now select the color that you want. In the attached picture, I have selected Yellow color for a piece of pie chart.

  • Using HTML,how to change the color of column data in an interactive report?

    Hi,
    I want to change the color of data of a column in an interactive report.
    I want to do it by HTML.
    I have tried the code
    <style type="text/css">
    #apexir_EMP_MANID{color:blue;}
    </style>
    But it changes the color of the heading of column only. Not the data.
    Plz can anyone suggest me something ?
    Thanks in advance

    Hi Vaibss!
    Is it that what you're looking for?
    Color Coding (Post number 5)
    regards

  • Changing the color of the column in a JTable based on the selection (mouse)

    Hi,
    I want to change the color of all the cells in a column based on the mouse clicked event.
    I have managed to select the entire column. And, even, I have found a working example in the internet. But I don't understand why in my case it doesn't work.
    This is the code (an inner class for a TableCellRenderer):
    class MCTableCellRenderer extends JLabel implements TableCellRenderer {
              private static final long serialVersionUID = 1L;
              @Override
              public Component getTableCellRendererComponent(JTable table,
                        Object value, boolean isSelected, boolean hasFocus, int row,
                        int column) {
                   setFont(table.getFont());
                   if(value instanceof Double){
                        setHorizontalAlignment(SwingConstants.RIGHT);
                        DecimalFormat numberFormat = (DecimalFormat) NumberFormat.getInstance();
                        numberFormat.applyPattern("#######.#");
                        String val = numberFormat.format(value);
                        setText(val);
                   if(isSelected){
                        setBackground(Color.RED);
                        System.out.println("is selected");
                   else{
                        setBackground(Color.BLACK);
                        System.out.println("is not selected");
                   return this;
        }I have set opacity to true for the contentPane, but without any result.
    Any advice will be very apreciated.

    Problem solved.
    My Renderer should have extended the abstract class DefaultTableCellRenderer.
    class MCTableCellRenderer extends DefaultTableCellRenderer {

  • How do i change the color of a JTable's column names

    hai,
    i'm very new to java and trying to customize the look of a JTable.
    how do i change the color of a JTable's Column names. i know its very simple, i just couldn't figure out how to do it!!
    thanx in advance

    table.getTableHeader().setForeground(Color.RED);

  • How to change the color of 1px_trans.gif image of interactive report

    Hi All,
    Iam using interactive report in apex3.2
    I need to change the color of 1px_trans.gif or remove the image in search tool bar
    where we can change.
    pls tell me .......
    Thanks & regards
    Balu..

    I need to change the color of 1px_trans.gif or remove the image in search tool bar 1px_trans.gif is transparent and doesn't have a colour. It is used as a shim image&mdash;an outdated way of controlling the dimension(s) of some element(s). It's intended to be invisible. Giving it colour will cause it to become visible, resulting in all sorts of unexpected and unwanted lines (or worse, solid areas of colour) appearing throughout applications.
    What do you think you want to do? (Whatever that is, it will almost certainly not be achieved by changing the colour of 1px_trans.gif...)

  • Data model automatically changes the color and the report corrupts.

    we want to run six reports in a single report and users can run the report they select . So,We have 23 simple queries in datamodel and 20 pages of layout,
    it was working fine.but now if we make some changes the color in the datatmodel changes,when we try to save this the file corrupts.when we try to open the
    file it says some information missing in the report.we have reports builder10g.Is there any size limit for rdf file? because our rdf file size 944kb.
    Thank you.

    No.

  • How to change the color of the table columns........

    Hi,
    I am new to the Jdeveloper and also for the adf components.Actually i am working with the project which has already designed.Now i have to change the look n feel.
    I want to change the color of the table colums.So could u tell me in which file i have to change and how.
    I put in the jdeveloper.css like this ......
    column.cell-number-band{
    color :Teal
    And in the adf-faces-config.xml i had only "oracle" type of skin.
    I have to finish the work tomarrow itself......
    So anybody helps me it will be greatfull me.

    Hi Frank,
    Thanks for the reply .I will try to create custom skin file.And one thing i tried to change the columns properties.I can see the changes on the Jdeveloper editor.But when i run on the server,I could't see the changes.....is there any way to change the column colors at run time????????
    I appreciate ur response......
    Thanks

  • Trying to change the color of a single cell

    hi, I am trying to change the color of a single cell when mouse moves over it, but couldn't do it. i even tried my own renderer, but it doesn't work. can anybody help ?

    Here is what I am trying to do. I am displaying some data in a java JTable retrieved from a table in database. What is needed is when user moves his mouse over any cell in the third column, the cursor should change to hand cursor and possibly the background color should also change, to indicate the user that this cell is clickable. I have to show some other report when user clicks any cell in column three. The code follows as
    import java.awt.*;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.sql.rowset.*;
    import javax.swing.table.*;
    public class MouseMotionInTable extends JFrame
    public static void main(String[] args)
      MouseMotionInTable f = new MouseMotionInTable();
      Toolkit tk = Toolkit.getDefaultToolkit();
      Dimension dim = tk.getScreenSize();
      int w = dim.width;
      int h = dim.height;
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setBounds((w-600)/2, (h-300)/2, 600, 300);
      f.setVisible(true);
    MouseMotionInTable()
      Connection con = null;
      CachedRowSet crs = null;
      try
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       con = DriverManager.getConnection("jdbc:odbc:FMS", "", "");
       Statement st = con.createStatement();
       String query = "SELECT ItemName, Alias, ItemReOrderQuty, ItemMeasure FROM ItemInfo";
       ResultSet rs = st.executeQuery(query);
       crs = new com.sun.rowset.CachedRowSetImpl();
       crs.populate(rs);
       st.close();
      catch (SQLException e)
       e.printStackTrace();
      catch (ClassNotFoundException e)
       e.printStackTrace();
      finally
       if(con != null)
        try
         con.close();
        catch (SQLException e)
         e.printStackTrace();
      DBTableModel model = new DBTableModel(crs);
      table = new JTable(model);
      JPanel center = new JPanel();
      center.setLayout(new BorderLayout());
      center.add(new JScrollPane(table), BorderLayout.CENTER);
      add(center, BorderLayout.CENTER);
      table.addMouseMotionListener(new MouseMotionAdapter()
       public void mouseMoved(MouseEvent me)
        int col = table.columnAtPoint(new Point(me.getX(), me.getY()));
        int row = table.rowAtPoint(new Point(me.getX(), me.getY()));
        if(col == 2)
         Object val = table.getValueAt(row, col);
         boolean isSelect = table.isCellSelected(row, col);
         boolean focus = table.isCellSelected(row, col);
         TableCellRenderer cellRender = table.getCellRenderer(row, col);
         Component comp = cellRender.getTableCellRendererComponent(table, val, isSelect, focus, row, col);
         comp.setCursor(new Cursor(Cursor.HAND_CURSOR));
         comp.setBackground(Color.yellow);
    private JTable table;
    class DBTableModel extends AbstractTableModel
    ResultSet rs;
    ResultSetMetaData rsMeta;
    DBTableModel(ResultSet rs)
      try
       this.rs = rs;
       rsMeta = rs.getMetaData();
      catch(SQLException e)
       e.printStackTrace();
    public int getColumnCount()
      try
       return rsMeta.getColumnCount();  
      catch(SQLException e)
       e.printStackTrace();
      return -1;
    public String getColumnName(int c)
      try
       return rsMeta.getColumnName(c+1);
      catch(SQLException e)
       e.printStackTrace();
      return "";
    public int getRowCount()
      try
       rs.last();
       return rs.getRow();
      catch(SQLException e)
       e.printStackTrace();
      return -1;
    public Object getValueAt(int r, int c)
      try
       rs.absolute(r+1);
       return rs.getObject(c+1);
      catch(SQLException e)
       e.printStackTrace();
      return "";
    public boolean isCellEditable(int r, int c)
      return false;
    public Class getColumnClass(int c)
      return getValueAt(0,c).getClass();
    }

  • Changing the color of a single field in a row of a table

    Is it possible to change the color of text of a single field within a single column. If field 'C' in a row is negative number change the text color to red. Is this possible?

    Hi Champion,
    Please Do search before posting.. you get lots of threads here...
    Re: color for a particular column in table
    Re: Color a table row
    Please go through this..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/707fb792-c181-2d10-61bd-ce15d58b5cf1?QuickLink=index&overridelayout=true

  • Change the color of a particular row in a jtable

    I have a jtable and i want to change the color of one particular column and few rows to blue and underline the text depending on some condition. In my view class if a condition is true
    for( count=0;count<grdTest.getRowcount;count++)
    if(some condition true)
    grdTest.getColumnModel().getColumn(0).
    setCellRenderer(new MyTestCellRenderer(count));
    And my cell renderer
    public class MyTestCellRenderer extends DefaultTableCellRenderer {
    int rowIndex=-1;
    public MyTestCellRenderer(int rowcount) {
    super();
    rowIndex=rowcount;
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    super.getTableCellRendererComponent(table, value,
    isSelected, hasFocus, row, column);
    if(row == rowIndex)
    setText("<html> <u> <font color='blue'>" + value.toString());
    return this;
    This is behaving very wierd . If suppose there are 50 rows and all of them have the condition true then only the last one in the row color is changes.
    However if only one out othe say10 has the condition true then it changes the color and underlines the particular row,column.
    Is there any other way to do this or what i am doing wrong
    Thanks

    if(row == rowIndex)Your code is a shambles because of the lack of tags, but I don't believe I see anything being called when this boolean condition is not true. That would be a problem.                                                                                                                                                                                                                                                                                                                                                                                                           

  • HOw can i change the color of a cell

    How can I change the color of a cell when it is selected. I select the cell by pressing enter, then I want the text in the cell to change color to red, but all the cells in the table change color. Please I would be grateful for some help

    Subclass DefaultTableCellRenderer.
    public class MyCellRenderer extends DefaultTableCellRenderer
    Override
    public Componet getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    JLabel lab = new JLabel(String)value);
    lab.setOpaque(true);
    return lab;
    if(isSelected)
    lab.setBackground(Color.red);
    else
    lab.setBackground(Color.white);
    Set the columns in your table:
    table.getCoulumModel.getColumn(0).setCellRenderer(new myCellRenderer());
    table.getCoulumModel.getColumn(1).setCellRenderer(new myCellRenderer());
    etc. for each column in your table.

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • Changing default color scheme when exporting ALV report to Excel spreadshee

    Hi all,
    We have a bunch of FI reports created using OOPS in abap.  Each of the reports has the functionality to be exported to an excel spreadsheet.  When exporting to Excel, the headers are a very dark brown color, making them difficult to read and it has been requested that they are shaded a lighter color.  I have not defined any sort of color scheme within the report itself, and I was wondering if there was a way to change the color scheme when exporting the report to excel.  Let me know if there is anything that can be done, thanks!

    check ur fcat

Maybe you are looking for