[REPORTS BUILDER] How to set different colors on every row?

Hi all,
I am building a report with a lot of rows. What i would like to do is give every row a different colour.
Such as:
Row 1 : None
Row 2 : Lightblue
Row 3 : None
etc..
Does anybody know how to do that?
Thanks in advance,
Daniel

Hello,
Highlight every alternate row
Regards

Similar Messages

  • How to set different color for items in selectManyCheckbox

    hi,
    I would like to change item text background color for each item on selectManyCheckbox (different for each item).
    It is only 5 items so that could be static reference or select.
    I know only how to change background for all items
    af|selectManyCheckbox::item-text {
        background:orange;
    How to select concrete item text and change color for only them?
    I found similar problem:
    css - Set background color of every individual checkbox of p:selectManyCheckbox - Stack Overflow
    but this dont work for me because I dont have in adf tr structure
    I need somethink like this:
    af|selectManyCheckbox::item-text XXXX - select here one of the item by number on list or id  {
        background:orange;

    hi,
    thanks Alejandro and Federico for answers.
    I use JDev 11.1.1.6. I dont write it in previously post because I think that is a more css then adf problem.
    I have 5 selectItem based on simple List<String> {"text1", "text2", "text3", "text4". "text5"}:
    <af:selectManyCheckbox label="List" id="smc2"
                                               layout="horizontal"
                                               value="#{bean.listInBean}"
                                               autoSubmit="true">
                          <af:selectItem label="text1" value="text1" id="si47"/>
                          <af:selectItem label="text2" value="text2" id="si43"/>
                          <af:selectItem label="text3" value="text3" id="si46"/>
                          <af:selectItem label="text4" value="text4" id="si45"/>
                          <af:selectItem label="text5" value="text5" id="si44"/>
                        </af:selectManyCheckbox>
    and I would like to color first selectItem text to orange, second to red.. etc, The list is a static list. Not would be changed.
    After Alejandro answer I build simple for each element (anyCollection contains item with two fields: textValue and label {(text1,text1), (text2,text2)...}
      <af:forEach items="#{bean.anyCollection}"
                                      var="item">
                            <af:selectItem id="si48" value="#{item.textValue}"  styleClass="yourClassName#{var.index}"
                                           label="#{item.label}"/>
                          </af:forEach>
    And now if I have my var called "item" I can write 5 css style classe yourClassName#{var.index} with different color, but there is a problem:
    Attribute styleClass is not defined for af:selectItem
    If it will be so simple I will just add 5 style classes for each selectItem
    <af:selectItem label="text1" value="text1" id="si47" styleClass="yourClassName0"/>
    <af:selectItem label="text2" value="text2" id="si43" styleClass="yourClassName1"/>
    Should I use other component then adf facer rich?

  • How to apply different colors to specific rows in JTable

    hi,
    Anybody could tell me the way of colorising the rows in jtable.. I want to apply different colors to diff rows..
    If i get a piece of code that could help me a lot..
    thanks in advance,
    Sapna

    you'll find the answer at http://www2.gol.com/users/tame/swing/examples/SwingExamples.html

  • How to set different color text in JTabe cell

    Hi
    I have been searching many forums to find how can this be done, but no success.
    I have Custom JTable with MyTableRenderer which is nothing else but alternate the color of rows(cells), CustomTableModel extends DefaultTableModel adding functionality for updateCellContent with different messages.
    I have a column in which cells i want to set these messages in different color.They are not set by user's editing, and by updating the content using the table model.
    Here is the code for that
    public void updateCellContent(HashMap<String, String> messages, int col) {
            for (int row = 0; row < this.dataVector.size() - 1; row++) {
                //This value is hardcoded for now.
                boolean isError = true;
                String filename = getFilename(row);
                String message = messages.get(filename);
                if (message != null) {
                    if (isError) {
                        setErrorMessage(message, row);
                    } else {
                        setMessage(message, row);
        private void setErrorMessage(String message, int row) {
            this.setFileStatus(message, row);
        private void setMessage(String message, int row) {
            String value = (String) this.getValueAt(row, COL_FILE_STATUS);
            ((Vector) this.dataVector.get(row)).setElementAt(value + " " + message, COL_FILE_STATUS);
            fireTableCellUpdated(row, COL_FILE_STATUS);
    public void setFileStatus(String message, int row) {
            setValueAt(message, row, COL_FILE_STATUS);
        }Thanks
    Dimitar

    I have Custom JTable with MyTableRenderer which is nothing else but alternate the color of rows(cells)If I understand you correctly a better way to do this is to override the prepareRenderer(...) method of JTable. You can search the forum for my "Table Prepare Renderer" (without the spaces) example which shows how this can be done.
    I have a column in which cells i want to set these messages in different color.Then you need to use a custom renderer for that column.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

  • How to set different colors for even odd rows in a data table

    hi,
    In my project i hav a data table. i am using jsf. i want the rows of the data table different colors for even, odd rows. can i do it just setting the row class property ? or there should be there some other way? please help.
    sailajoy

    Hope this helps
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title></title>
    <style type='text/css'>
    .scrollContent {
    height:100px;
    overflow-x:hidden;
    overflow-y:auto;
    .scrollContent tr {
    height: auto;
    white-space: nowrap;
    .scrollContent tr td:last-child {
    padding-right: 20px;
    .fixedHeader tr {
    position: relative;
    height: auto;
    top: expression( this.parentNode.parentNode.parentNode.scrollTop + 'px' );
    div.TableContainer {
    border: 1px solid #7DA87D;
    .headerFormat {
    background-color: white;
    color: #C8D7B5;
    margin: 3px;
    padding: 1px;
    white-space: nowrap;
    font-family: Helvetica;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    .headerFormat tr td {
    border: 1px solid #C8D7B5;
    background-color: #666633;
    .bodyFormat tr td {
         color: #000000;
         margin: 3px;
         padding: 1px;
         border: 0px none;
         font-family: Helvetica;
         font-size: 12px;
    .alternateRow {
    background-color: #C8D7B5;
    </style>
    <style type="text/css">
    div.TableContainer {
    height: 121px;
    overflow-x:hidden;
    overflow-y:auto;
    </style>
    </head>
    <body>
    <table cellpadding="0" cellspacing="0" border="0"><tr><td><div id="TableContainer" class="TableContainer" style="height:230px;">
    <table class="scrollTable">
    <thead class="fixedHeader headerFormat">
    <tr class="title">
    <td title="Sort" align="center"><b>NAME</b> </td>
    <td title="Sort" align="center"><b>Amt</b> </td>
    <td title="Sort" align="center"><b>Lvl</b> </td>
    <td title="Sort" align="center"><b>Rank</b> </td>
    <td title="Sort" align="center"><b>Position</b> </td>
    <td title="Sort" align="center"><b>Date</b></td>
    </tr>
    </thead>
    <tbody class="scrollContent bodyFormat" style="height:200px;">
    <tr class="alternateRow">
    <td>Maha</td>
    <td>
    <input type="text" name="textfield" size="7" />
    </td>
    <td align="right"><input type="text" name="textfield2" size="7" /></td>
    <td align="right"><input type="text" name="textfield3" size="7" /></td>
    <td><input type="text" name="textfield4" size="7" /></td>
    <td align="right"><input type="text" name="textfield5" size="7" /></td>
    </tr>
    <tr>
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">100%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow">
    <td>Marhanen</td>
    <td align="right">$223.04</td>
    <td align="right">83</td>
    <td align="right">99%</td>
    <td>Banker</td>
    <td align="right">06/27/2006</td>
    </tr>
    <tr>
    <td>Peter</td>
    <td align="right">$121</td>
    <td align="right">567</td>
    <td align="right">23423%</td>
    <td>FishHead</td>
    <td align="right">06/06/2006</td>
    </tr>
    <tr class="alternateRow">
    <td>Jones</td>
    <td align="right">$15</td>
    <td align="right">11</td>
    <td align="right">15%</td>
    <td>Bubba</td>
    <td align="right">10/27/2005</td>
    </tr>
    <tr>
    <td>Supa-De-Dupa</td>
    <td align="right">$145</td>
    <td align="right">91</td>
    <td align="right">32%</td>
    <td>momma</td>
    <td align="right">12/15/1996</td>
    </tr>
    <tr class="alternateRow">
    <td>ClickClock</td>
    <td align="right">$1,213</td>
    <td align="right">23</td>
    <td align="right">1%</td>
    <td>Dada</td>
    <td align="right">1/30/1998</td>
    </tr>
    <tr>
    <td>Mrs. Robinson</td>
    <td align="right">$99</td>
    <td align="right">99</td>
    <td align="right">99%</td>
    <td>Wife</td>
    <td align="right">07/04/1963</td>
    </tr>
    <tr class="alternateRow">
    <td>Maha</td>
    <td align="right">$19,923.19</td>
    <td align="right">100</td>
    <td align="right">100%</td>
    <td>Owner</td>
    <td align="right">01/02/2001</td>
    </tr>
    <tr>
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">100%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow">
    <td>Marhanen</td>
    <td align="right">$223.04</td>
    <td align="right">83</td>
    <td align="right">59%</td>
    <td>Banker</td>
    <td align="right">06/27/2006</td>
    </tr>
    <tr>
    <td>Peter</td>
    <td align="right">$121</td>
    <td align="right">567</td>
    <td align="right">534.23%</td>
    <td>FishHead</td>
    <td align="right">06/06/2006</td>
    </tr>
    <tr class="alternateRow">
    <td>Jones</td>
    <td align="right">$15</td>
    <td align="right">11</td>
    <td align="right">15%</td>
    <td>Bubba</td>
    <td align="right">10/27/2005</td>
    </tr>
    <tr>
    <td>Supa-De-Dupa</td>
    <td align="right">$145</td>
    <td align="right">91</td>
    <td align="right">42%</td>
    <td>momma</td>
    <td align="right">12/15/1996</td>
    </tr>
    <tr class="alternateRow">
    <td>ClickClock</td>
    <td align="right">$1,213</td>
    <td align="right">23</td>
    <td align="right">2%</td>
    <td>Dada</td>
    <td align="right">1/30/1998</td>
    </tr>
    <tr>
    <td>Mrs. Robinson</td>
    <td align="right">$99</td>
    <td align="right">99</td>
    <td align="right">(-10.42%)</td>
    <td>Wife</td>
    <td align="right">07/04/1963</td>
    </tr>
    <tr class="alternateRow">
    <td>Maha</td>
    <td align="right">-$19,923.19</td>
    <td align="right">100</td>
    <td align="right">(-10.01%)</td>
    <td>Owner</td>
    <td align="right">01/02/2001</td>
    </tr>
    <tr >
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">-10.20%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow" >
    <td><strong>TOTAL</strong>:</td>
    <td align="right"><strong>999999</strong></td>
    <td align="right"><strong>9999999</strong></td>
    <td align="right"><strong>99</strong></td>
    <td > </td>
    <td align="right"> </td>
    </tr>
    </tbody>
    </table>
    </div></td></tr></table>
    </body>
    </html>

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • Set different color for one JTree node

    hello,
    I managed to find how to set a color for Jtree nodes but the problem is that with my method all the nodes will b the same color whereas i'm looking to have nodes of different color depending on the situation.
    the method for setting all Jtree nodes the same color(other than black):
    tree.setCellRenderer(
    new DefaultTreeCellRenderer() {
       public Color getTextNonSelectionColor() {
         return Color.lightGray; } });I WANT TO CHOSSE EACH COLOR FOR EACH NODE
    help plz
    thanks

    You need to implement TreeCellRenderer interface
    public Component getTreeCellRendererComponent(JTree tree,
                                                  Object value,
                                                  boolean sel,
                                                  boolean expanded,
                                                  boolean leaf,
                                                  int row,
                                                  boolean hasFocus)You can know which node is rendering by check value argument. Please read DefaultTreeCellRenderer's code.

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • How to set background color in row of JTable ?

    i am new in java please tell me about How to set background color in row of JTable ? please example code. Thnak you.

    Here is an example: http://www.javaworld.com/javaworld/javaqa/2001-09/03-qa-0928-jtable.html
    For more info on how to use tables read the swing tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ICE

  • How to set background color in af:inputText in an af:table

    Hi,
    how to set background color in af:inputText in an af:table depending on the value of af:inputText.
    For example, how to set background red if the af:inpuText is empty
    Thanks

    Hello Pavo,
    it's also possible to take the code from ebitar and use the expression within styleClass instead of inlineStyle.
    E.g. you can define a custom style "StyleClassEmptyText" in your skin and set this styleclass if af:inputtext is empty.
    By using style classes you can have the same style in the whole application and you are able to change this style on a single point(in the styleclass) for the whole application.
    br
    Peter

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • How to set different renderers to different cells in same column of JTable?

    Hello Friends,
    I need your help again...
    Does any body knows, how to set different renderer's for different cells of same column in JTable..??
    For ex.
    Col1 Col2 Col3 Col4
    A       A       A      A
    A       A       A      B
    A       A       A      C
    A       A      A       D
    Where A B C D would be different Renderers.  I want set exactly same ,,, ie. one column with different renderer at different cell positions..
    Right now i m setting renderer using statement bellow :
    table.getColumnModel().getColumn(int).setCellRenderer(rederer_Instance);But with this, effect in the last renderer is applicable whole column....
    Can any body help me out ?????????
    please refer this thread for similar kind of discussion...
    http://forums.sun.com/thread.jspa?forumID=57&threadID=571445Thanks
    Suyog

    Please refer to the first reply of [this thread|http://forums.sun.com/thread.jspa?forumID=57&threadID=571445] for the answer. If you have a specific problem implementing it, post you code with a specific question.

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • How to set Interior color of annotation ?

    Hi,
    I am using following code to set interior color of annotation(square/circle). But it is not working. Could you please figure out the issue or let me know how to set interior color?
    CosObj cosAnnot = PDAnnotGetCosObj (annot);
    CosDoc cosDoc = CosObjGetDoc(cosAnnot);
    CosObj cColorObj = CosNewArray(cosDoc,
    false  , 3);CosArrayPut(cColorObj, 0, CosNewFixed(cosDoc,
    false, interiorColor[0]));CosArrayPut(cColorObj, 1, CosNewFixed(cosDoc,
    false , interiorColor[1]));CosArrayPut(cColorObj, 2, CosNewFixed(cosDoc,
    false, interiorColor[2]));CosDictPutKeyString(cosAnnot,
    "IC", cColorObj);PDAnnotNotifyDidChange(annot, ASAtomFromString(
    "IC"), 0);
    I am calling above code in the notification of PDPageDidAddAnnot.
    Regards,
    Arvind

    Did you check that your object was correctly modified?  Looks good here, but that's an important check.
    Second, calling a notification from a notification is never a great idea - always prone to issues.  Try postponing the change till the next Idle, for example.

Maybe you are looking for

  • Gif Animations

    First off, I'd like to say I've been making gif animations in Photoshop Elements since 2.0, and I've had no problem with 6.0 either--- when I was on Windows. For whatever reason, when I open a .gif animated image, I get an error message that says: "T

  • Humantask Notification configuration

    Hi All, I have a human task configured in my BPEL and the notification mails are sent with some custom message defined in my .task file. Apart from the custom message I am also getting a "Action Links:      Worklist Application" URL to the worklist a

  • Create Purchase Order (ME21)

    Can anyone explain how to create PO (ME21).

  • Premiere Pro CC crashing when I request to import footage

    I'm working on a currently updated version of Premier Pro CC on a mac pro. I am trying to import h.264 .mov files shot on a 5d mkiii I try to import footage using several methods, (finder drag and drop), left click--> import--> files any time I try e

  • My iPhoto keeps crashing after it is open for 4 seconds I have 10.7.5

    Process:         iPhoto [56189] Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifier:      com.apple.iPhoto Version:         9.3.2 (9.3.2) Build Info:      iPhotoProject-670063000000000~2 App Item ID:     408981381 App External