Alternating Row colour

Post Author: vovo
CA Forum: General
Is it possible to have alternating row colour? Eg. First row background colour is white and second row background colour is grey. Can somebody help me? Thanks.

Post Author: vovo
CA Forum: General
Got it to work... Shared numbervar RowCount;whileprintingrecords;RowCount :=RowCount+1;if (RowCount mod 2=1) then    crWhiteelse    color( 47, 179, 79);

Similar Messages

  • Multiple alternating row colours

    I need to flag each row with different colours depending on the values in the columns. I believe you can do it in the definition of an alternating row report template but it only has entries for 4 conditions. How can I colour rows with more that 4 different colours at once? I have up to 8 possible conditions therefore I need up to 8 different colours displayed at once.
    regards
    Paul Platt

    Marc:
    I am not referring to the number of colors or the aesthetics. Just the difference in the visual appearance between
    http://htmldb.oracle.com/pls/otn/f?p=24317:55
    which uses the builtin Alternating Row Colors template
    vs what you suggested.
    In other words, the Alternating Row Colors template colors the row background but preserves the "grid" lines. Your solution obliterates all other styles on the row.
    Dont get me wrong, your solution is brilliant, very creative.
    On a related note, the technique I came up with, wrapping the entire row in a DIV and styling that in the query, doesnt work because it generates HTML like
    open TD1
    open DIV
    close TD1
    open TD2
    close DIV
    close TD2
    This messes up the DIV since it spans the TD cells.
    If it were to generate
    open DIV
    open TD1
    close TD1
    open TD2
    close TD2
    close DIV
    then my solution would work as well.
    But I dont think there is a way to generate a outer-most DIV like that using a column template, right? I cant modify the report template since my DIVs are going to contain dynamic styles from my query itself.
    Thanks

  • Alternating row colours in a repeating list?

    Hi guys
    Sorry if this has been asked before I couldn't find anything after doing some searching.
    I was just wondering how I would go about implementing alternating colours (i.e. how you would expect it to look in a datagrid in flex) in flash catalyst?
    Also as a side note - I'm pretty sure this isn't possible from the pages I've read online but since I'm here I'll ask: is there any way of implemeting a datagrid (or ideally an advanced datagrid) in flash catalyst and then bringing it into flash builder?
    Thanks.

    There's no capability to do this in the current version of Fc - though do take a look at this thread. 
    Adam suggests a work-around.
    http://forums.adobe.com/message/2163645
    And here Chris helps with DataGrids:
    http://forums.adobe.com/message/2840956
    Best,
    Tanya

  • Alternating Row Colours with a Twist

    I have a report that allows viewing detail or summary. 
    The report lines are as follows:
    Report Header
    Page Header
    Group Header #1a
    Group Header #1b
    Details
    Group Footer #1
    Page Footer
    Report Footer
    For Detail
    Detail line is not suppressed
    Group Header #1b is suppressed
    For Summary
    Detail line is suppressed
    Group Header #1b is not suppressed
    I know how to alternate line colours in the detail, and that works fine.  However I also need to alternate line colours for the summary which is not working as planned.  I tried putting the same code in the Group Header #1b background colour code behind, but the colours don't alternate.  There is groups of two or three that are one colour and then a group of the alternate colour, etc.
    How do I alternate colours on Group Headers (when Detail line is suppressed)
    Edited by: Clif001 on Mar 18, 2011 1:19 PM
    Edited by: Clif001 on Mar 18, 2011 1:35 PM

    Hi Clif,
    Try the following :
    Create a manual running total and place it on your groupheader 1b when you have even number change the back ground color
    Example :
    Whileprintingrecords;
    Numbervar x;
    x:x+1;
    Now place this formula and apply alternate group color logic when you have even number on your gorup header.
    Thanks,
    Sastry

  • Alternating row colours @Carl

    Hi
    I have a question to your examble located at http://htmldb.oracle.com/pls/otn/f?p=11933:7:1758870993778402
    in which way must i change your code that it works for more than 4 columns
    i tried it without any success

    i tried it
    What did you try?
    It is quite simple really.
    The report query is
    select decode(deptno, 10, 'class1', 20, 'class2', 30, 'class3') trclass , ename, job, sal, comm from emThe first column (trclass) determines the CSS class to be used for that row.
    The report template uses this as Carl shows in his example page. His example page uses 4 columns using #1#, #2#, etc. notation. If you add more columns to the query, just extend the template accordingly.

  • Alternating row color is missing a row

    Hi,
    I've made a table and have checked the "alternating row color" box.  It's working fine except for the top row, which should be colored in and isn't.
    Any suggestions on how to fix this?
    thanks.

    Is the top row a header row? That may prevent it from being the intended colour. If so, remove the header setting and reapply the alternating row colour.

  • Alternating row color

    I have a spreadsheet and the alternating row color only works down to a certain row. I can't copy the style, etc. Tried turning it off and then back on and that doesn't work. Also when I copy a cell from a blue row to a white row it retains the blue color for that cell on the white row. Any ideas?
    Thanks.

    Select all the rows that are not showing the alternating colour fill and go back to the inspector and set colour fill to NONE. Don't select the header column, if any, as the colour fill will be removed from that too. The copy and paste including the colour is normal behaviour, you can use Edit > paste values instead
    Have a good day.

  • Webi Alternate Row Colour

    Hi experts,
    I have a webi report which colour lines must have alternate colours. I customized that on the table proporties, in webi, but it's not working... is there some kind of trick to activate alternate row colours?
    Thanks you.
    Cheers!
    Inê

    If you change "Alternate Row/Column colors"property of block then it should applied for that particular block only.
    If you want other colors for other blocks then do the same steps.
    Frequency is by default 2. Which tells us the applied color should show alternatively, and 3,4, etc..., follows like that.
    FYI if you change property of a block and insert new objects then you can't see colors again for the same block.
    Manually you need to do it again to appear.
    Eg:
    if i individually insert say 5 rows to block and drag unique report variables to each row, the alternative colours are not coming up.
    How to acieve this?
    This is the problem, the alternate row fucntion works for a row which have more than one value. In your case you have different variables for each row then you have to do it manually. Remember that if you have more than one value for any variable the second row of that variable will be 255,255,255. By default first row gets the alternate color. You get the same alternate color for all 5 rows because it's first row of all the 5 variables.
    One trick is give alternate color as 239,239,239 for first row and 255,255,255 for second and so on.
    Hope you got me.
    Gracias...!!

  • Alternating row backgrounds on a JTable

    Howdy Partners,
    I'm tryin' to get some examples of code that'll write a JTable with alternating background colour in the rows.
    I need more than a couple of hints in a direction as I'm pretty green still. I've spent half the morning searching but can't find anything satisfactory.
    Muchos gracias amigos.

    Here is how you can do it.
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.event.MouseEvent;
    import java.util.EventObject;
    import javax.swing.DefaultCellEditor;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.WindowConstants;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableModel;
    public class Temp extends JFrame {
         private JTable table = null;
         private TableModel model = null;
         public Temp() {
              super("Test");
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              model = new AbstractTableModel() {
                   public int getColumnCount() {
                        return 3;
                   public int getRowCount() {
                        return 30;
                   public Object getValueAt(int rowIndex, int columnIndex) {
                        return "CELL " + ((rowIndex + 1) * (columnIndex + 1));
                   public boolean isCellEditable(int row, int col) {
                        return true;
              table = new JTable(model);
              table.setDefaultRenderer(Object.class, new MyTableCellRenderer());
              JScrollPane scroller = new JScrollPane(table);
              getContentPane().add(scroller);
              pack();
              setVisible(true);
         public static void main(String [] args) throws Exception {
              new Temp();
         class MyTableCellRenderer extends JLabel implements TableCellRenderer {
              public MyTableCellRenderer() {
                   super();
                   setOpaque(true);
              public Component getTableCellRendererComponent(JTable table,
                   Object value, boolean isSelected, boolean hasFocus,
                   int row, int column) {
                   setText(String.valueOf(value));
                   Color bgColor = Color.white;
                   if(row % 2 == 0) {
                        bgColor = Color.lightGray;
                   setBackground(isSelected ? Color.blue : bgColor);
                   setForeground(isSelected ? Color.white : Color.black);
                   setFont(table.getFont());
                   return this;
    }Sai Pullabhotla

  • Want robust solution for alternating row color, resetting every group

    I would like a solution for displaying an alternating row color for my detail rows that resets every group, so that row 1 is always gray.
    Our Crystal designer provided this code to me:
    @rowcnt formula, suppressed, placed in Detail row:
    Shared numbervar rowcnt;
    rowcnt := rowcnt + 1;
    @resetrowcnt, suppressed, placed in Group row:
    Shared numbervar rowcnt;
    rowcnt := 0;
    Formatting formula, placed in Color in Detail > Section Expert:
    Shared numbervar rowcnt;
    if Remainder(rowcnt, 2) <> 0 then
    color(241,241,241)
    else
    crWhite
    This was working fine for me.
    However, it is suddenly not working in one of my reports.
    The report does happen to have two groups (rowcount.png).
    When the report is run, all rows are colored (rowcount02.png).
    This report was previously working fine!  I'm not sure what changed.
    In any case... surely there must be standard code to do this very standard formatting.
    I would be very grateful if someone could post some robust code to accomplish the following:
    REPORT DATA IN DETAIL ROW, ALTERNATE ROW BANDING:
    - Data in Detail row displays alternating row colors
    - Odd rows are always shaded, even rows not
    - Banding resets every group / does not continue pattern from previous group
    REPORT DATA IN GROUP ROW, ALTERNATE ROW BANDING:
    Some of our reports place row data in a group row (just the way it happened).
    If you could also modify your code in this case.
    Thank you!

    Hi Abhilash/Sastry, since I'm going to switch to Sastry's formulas, could you please confirm correctness of the following. I can't actually run this report, I can only provide it to our London office, bit of a lag for testing.
    @resetrowcnt:
    Whileprintingrecords;
    Numbervar cnt:=0;
    @rowcnt:
    Whileprintingrecords;
    if {HedgeDetails.StrategyID} <> previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID} <> previous({HedgeDetails.DealID}) then
         Numbervar cnt:=cnt+1;
    Details section (Suppress):
    not(OnFirstRecord) and
    {HedgeDetails.StrategyID}=previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID}=previous({HedgeDetails.DealID})
    Please note: Suppress checkbox is selected AND the above formula is entered.
    Details section (Color):
    Whileprintingrecords;
    Numbervar cnt;
    if cnt mod 2 <> 0 Then color(241,241,241) else crwhite

  • Report Template - Standard, Alternating Row Colors

    I'm using APEX 4.1.0 and theme 22 on Oracle 10g.
    I have some tabular forms in my application. For 2 of those, row deletions are allowed and I have the usual select box column to manage the row deletions. Also my users like the "Standard, Alternating Row Colors" report template and would like to see the alternating row colors whenever possible. Unfortunately I get the "Error on page." browser error in IE when I check a row selector box using this template. When I use a different report template I don't get this error.
    The tabular form functions correctly so this error is harmless, but I would like to know what it is for. I'm sure my users would rather not see that error.
    By the way, in Firefox the firebug error count increases and I get the following error in the console:
    TypeError: can't convert undefined to object
    [Break On This Error]      
    ...ovedColor)}gLastRowMoved=b}function html_RowUp(e,d){var c=$x_UpTill(e,"TR");ie_R...
    apex_4_1.min.js (line 18)Because all of the whitespace has been helpfully removed :) it's hard to see which expression is undefined and why.
    Any ideas?

    Hi Jackie,
    There must be some issues the apex_4_1.min.js file, try to reload it. In apex.oracle.com the tabular form with "Standard, Alternating Row Colors" just works fine.
    Regards,
    Natarajan

  • Can't get alternating rows style to work

    I have a spreadsheet in Numbers for iPad that I'm trying to style with alternating row colors. I don't even really care if its just gray and white, but I would like any form of alternating shades since I have a ton of data in one spreadsheet. It seems that no matter what I do on the settings, though, I can't get it to work. I tried changing the background of all the cells to no fill, then to white, then to gray...none of that seemed to make any difference. I also tried to select one of the pre existing styles and tried to apply that to my table and that also didn't seem to work. If anyone out there has any suggestions I would really appreciate it.
    Thanks

    Password for what?

  • Alternating row color for CF report Builder?

    I have a user who wants one of her reports to display
    alternating row colors for better read clarity. The reports are
    rather lengthy and the rows tend to blend in with eachother.

    Thanks Epulfy. I am going to give this a try later today.
    Much appreciated
    EDIT:: This does work. however I'm not sure how to set a
    rectangle to the background of the report so it's behind my
    details. I draw the rectangle and it just hides whatever I want to
    display. When I look at the report it does alternate with rows, but
    I can only see details from the rows that it does not alternate on.
    Any clue how to set it to the background?

  • Change background color of alternating rows in listview

    Hi all,
    Does anyone know how to change the background color of alternating rows in a listview in Visual Basic 2013?
    Best regards,
    Randy Boulter

    You can set the OwnerDraw property of the ListView to true and use the DrawItem event:
    Private Sub ListView1_DrawItem(sender As Object, e As DrawListViewItemEventArgs) Handles ListView1.DrawItem
    e.DrawDefault = True
    If (e.ItemIndex Mod 2) = 1 Then
    e.Item.BackColor = Color.FromArgb(220, 220, 220)
    e.Item.UseItemStyleForSubItems = True
    End If
    End Sub

  • DataGrid alternating row colors per column

    Is there a way to set different alternating colors to each
    column in a DataGrid. I have a datagrid where I want two of the
    columns to have different alternating row colors, one column (red
    and light red) and the other (green and light green).
    Many thanks

    You can simply set the DataGridColumn property to the
    approprate colors.
    ex.
    <mx:DataGrid y="0" x="0" width="100%">
    <mx:columns>
    <mx:DataGridColumn id="col1" backgroundColor="0x640000"
    dataField="col1"/>
    <mx:DataGridColumn id="col1" backgroundColor="0xFF0000"
    dataField="col1"/>
    <mx:DataGridColumn id="col1" backgroundColor="0x006600"
    dataField="col1"/>
    <mx:DataGridColumn id="col1" backgroundColor="0x33CC33"
    dataField="col1"/>
    </mx:columns>
    </mx:DataGrid>
    or you can use the setStyle:
    col1.setStyle("backgroudColor", 0x640000)

  • Table row colour loading problem

    Hi,
    Thanks for your time.
    I want to display table row colour dynamically based on table data.
    Am able to achieve it partially as below,when I scroll the table the loaded colour dissappears.
    I use the below code:-
    template: new sap.ui.commons.TextView().bindProperty("text","objectivecategory",function(category){
      if(category=="Operational"){
      backgroundColor='#fff2cb';
      backgroundColorClass ="operationColor"
      else if(category=="Strategic"){
      backgroundColor='#e8f5fe';
      }else{
      backgroundColor='#ecf6c1';
               cellId = this.getId(); 
               //alert("cellId"+cellId);
               $("#"+cellId).parent().parent().parent().css("background-color",backgroundColor);

    Hi Velu
    Here is an example
    Hope this answer your question.
    -D

Maybe you are looking for

  • Base64 to Blob

    Hi guys, I am not an oracle expert. I am trying to insert a base64 data into a Blob. I was trying to use : INSERT INTO MyDB.EXCELFILETABLE(FILELID,SPREADSHEETDATA,OWNER) values ( 1, utl_encode.base64_decode(utl_raw.cast_to_raw(b64Doc)),'owners' ) b64

  • To modify the price of the returned material

    Hello everybody! Please, help me, to find the ways of solution of such a problem. Our consultants are not satisfied that, how the cost of material is determined at a return from a buyer. They offer either creation of document of arrival of material o

  • How do I open a disk image made in disk utility?

    How do I open a disk image made in disk utility? I made the disk image myself and it won't let me open it.

  • Pritn to Laser and Dot Matrix

    Hi Our client need the functionality to print a invoice to a Laser and Dot Matrix at the same time. The Dot Matrix copy will be for the customer and the laser copy will be printed with barcode for filing purposes. Does anyone knows if this is possibl

  • Nokia 2730

    Hello everyone: My Issue is the next one: I bought a Nokia 2730 classic last year,i used it without a problem,Ovi worked fine and Ebuddy worked fine as well. Last week i followed an advice from Nokia that i should update the software on my phone,i up