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

Similar Messages

  • 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);

  • 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...!!

  • How to use the 'Decision between multiple alternatives' Process variant

    Hi ,
    Can anyone tell me how to use the 'Decision between multiple alternatives' Process variant in BI 7 Process chains ?
    The requuirement is that I have a DSO eg DSO 1 from which i have to load DSO 2 and DSO 3 . Now if the number of Records in DSO 1 are < 100 i will load DSO 2 from DSO 1 else i will load DSO 3 from DSO 1 .
    So in the PC i have used a 'ABAP Program' variant (which counts the number of rows in DSO 1) after loading DSO 1 and  after this 'ABAP Program' Variant , i have used the 'Decision between multiple alternatives' Process variant. Problem is it is giving me only some some system fields in the formula , like sy-datum or sy-timlo , which are of no use here .
    It would be great if i can receive some help here .
    --Devraj

    in RSPC you create a ABAP processing type "ending with specific values".
    We use true or false for things as you specify.
    your abap program should return a true or a false to indicate which of the situations is applicable.
    Is this helpful?
    Marco

  • 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

  • How to display multiple selected rows in a table inside a popup?

    Hi,
    I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
    Thanks
    Karan

    Hi,
    Not confident if this works or not but just try it...
    1. create a ViewLink between the same view Object.
    The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
    2. Update the changes in Appln Module.
    Open the AM and in DataModel tab .
    select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
    3. Refresh DataControl accordion.
    4. in your jsff page drag and drop the child vo as a table..
    See if it works
    Regards,
    Santosh.

  • 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?

  • How to create multiple new rows in ADF Table?

    Hello,
    being new to ADF Faces/BC I managed to display data in an ADF Table and create new entries using the "CreateInsert" operation (one at a time).
    Now, the next task is to create multiple new rows at the same time, set some default values and display the new rows in the ADF table. Then the user will enter additional data and commit the new rows.
    Where do I step in? In the EntitiyImpl? Can this be handled declaratively or do I have to implement custom method(s) in the AM?
    Thanks
    Gerald

    Hi John,
    I'm still getting the following error
    Error(94,144): method getValue() not found in class javax.faces.el.ValueBinding
    What should it be casted to?
    The code in backing bean is like this..
    package view.backing;
    //import com.test.model.TestAppModuleImpl;
    import javax.faces.component.html.HtmlForm;
    import javax.faces.component.html.HtmlPanelGroup;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    //import javax.faces.event.FacesListener;
    //import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.data.CoreColumn;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.adf.view.faces.component.core.nav.CoreCommandButton;
    import oracle.adf.view.faces.component.core.output.CoreMessages;
    import oracle.adf.view.faces.component.html.HtmlBody;
    import oracle.adf.view.faces.component.html.HtmlHead;
    import oracle.adf.view.faces.component.html.HtmlHtml;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    //import oracle.jbo.server.ViewObjectImpl;
    //import view.utils.EL;
    public class MultipleInsert1 {
    private HtmlHtml html1;
    private HtmlHead head1;
    private HtmlBody body1;
    private CoreMessages messages1;
    private HtmlForm form1;
    private CoreTable table1;
    private CoreColumn column1;
    private CoreInputText inputText1;
    private CoreColumn column2;
    private CoreInputText inputText2;
    private CoreCommandButton commandButton1;
    private HtmlPanelGroup panelGroup1;
    private CoreCommandButton commandButton2;
    public void setHtml1(HtmlHtml html1) {
    this.html1 = html1;
    public void createMultiRows(ActionEvent actionEvent) {
    DCBindingContainer dc = (DCBindingContainer) FacesContext.getCurrentInstance().getApplication().createValueBinding("#{bindings}").getValue();
    DCIteratorBinding iter = dc.findIteratorBinding("TestView1Iterator");
    ViewObject vo = iter.getViewObject();
    for (int i=1; i<=5; i++) {
    Row newRow = vo.createRow();
    newRow.setAttribute("Id", i);
    ApplicationModule am = vo.getApplicationModule();
    am.getTransaction().commit();
    vo.executeQuery();
    Do I need to import something else?
    Thanks,
    Shri.

Maybe you are looking for

  • How to remove a device from my plan

    I would like to remove a device from my Share Everything plan and lower my monthly bill.  How do I go about this?

  • Technical Systems and Business Systems

    Hello Everybody!!! I have some doubts, can you help me, please??? 1) Technical Systems are application(software) systems, ok? They aren't hardware systems, ok? 2) In my SLD I should have a SAP ECC system as a technical system and each of their client

  • Movies are Freezing on my TV But I Can Watch them through iTunes on my Computer

    I have a second generation Apple TV .. I can watch the movies in iTunes but they freeze when I try watch them on my Samsung Smart TV .. They only freeze at the start ... its hit and miss .. sometimes the movies start ... but a lot of the times they f

  • J2IUN only showing PLA Amount balance all NIL

    Hi, We are in the implementation phase. IN J2iun, only PLA amount is displayed wheras all others are showing 0.00 Can u suggest what cud be missing in that. I searched forum for similar posts and it says extract register from J2i5, and I did that but

  • Need Help in the installation of p6 v7 web access on weblogic

    Hello all i have a problem and i need help .. when i installed the Web Access on web-logic the state of the deployed application is failed i've installed it several times and the state is still failed i checked the configuration on page 160 on the ad