Alternating Row Colors - Interactive Report

Hello All,
I'm hoping someone out there can help me out w/this. :)
I'm a newbie working w/an Interactive Report and want to have alternating row colors as a default w/out losing the IR advantages.
I've tried javascript, but, whenever filters are applied the class gets stripped off.
Has anyone had any luck w/this?
Thanks In Advance

Roel,
I got it working... Adding the onload to the image is pretty awesome, I had to chuckle cause I would've never thought of that.
It wasn't working for me earlier, but, i realized after it was a silly syntax error. :P
Anywho - Check the link below.
http://apex.oracle.com/pls/otn/f?p=17445:7::::::
I had used a different striping script which was written by a buddy of mine Keith Daulton (Had to throw him props for a hawt script. Works in ie6/7, FF, Chrome & Safari).
I'm 100% sure I'm not the only one who's wanted this done and struggled to get it. So below I'm providing it for those who run into this thread.
<script type="text/javascript">
// THIS DOES THE STRIPING
function decorateDataGrids (strClass) {
     var tables = document.getElementsByTagName("table");
     for (var i=tables.length; i--;) {
          if (tables.className == strClass) {
               var gridRows = tables[i].getElementsByTagName("tr");
               for (var j=gridRows.length; j--;) { if (j%2) { gridRows[j].className = "even"; } }
window.onload = function () {
     decorateDataGrids("apexir_WORKSHEET_DATA"); // THIS DOES THE STRIPING
</script>
<style>
/* THIS OVERRIDES APEX'S DEFAULT STYLES */
table.apexir_WORKSHEET_DATA tr.even td {
     background-color:#F1F5FA !important;
table.apexir_WORKSHEET_DATA td {
     background-color:#FFFFFF !important;
     border:1px solid #B3B3A7 !important;
     padding:4px 8px !important;
</style>
onload event strapped to the img -- Thanks!!!
<img src="#IMAGE_PREFIX#edit.gif" alt="" onload="decorateDataGrids('apexir_WORKSHEET_DATA');">
Edited by: user11086646 on Jun 9, 2009 7:04 PM

Similar Messages

  • Interactive report default has alternating row colors, how to remove this?

    Is it possible to remove the alternating row colors from the interactive report.
    In a standard report I can select the report template, but in a interactive report not.
    Regards,
    Rob

    To customize a single page, add this rule to the CSS Inline page attribute:
    .apexir_WORKSHEET_DATA tr.odd td {
      background: rgb(242, 242, 242) !important;
    To apply to a complete application, either add
    .apexir_WORKSHEET_DATA tr.odd td {
      background: rgb(242, 242, 242) !important;
    to the Cascading Style Sheet Inline attribute on each page template, or create a CSS file containing
    .apexir_WORKSHEET_DATA tr.odd td {
      background: rgb(242, 242, 242);
    upload it to your workspace, and reference it after the theme link in each page template Header:
    <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_4/css/theme_4_0.css" type="text/css" />
    <link rel="stylesheet" href="#WORKSPACE_IMAGES#theme_4_0_no_alt_row.css" type="text/css" />

  • 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

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

  • Duplicating the "Standard, Alternating Rows Colors" report template

    The built-in theme 5 comes with a report template called "Standard, Alternating Rows Colors". This theme's template type is defined as "Generic Columns". I need to create a duplicate of this report template that has a template type of "Named Columns" instead of "Generic Columns".
    I've tried to create a brand new report template using the "Named Columns" template type and then copy/paste the appropriate HTML code from the original to the new one. Obviously there are some options in the "Generic Columns" template type that are not in the "Named Columns" template type, and vice versa, but I copied over what I thought was appropriate.
    No matter what I do, I don't seem to come close to having my copy look like the original. I've looked over the Report Template section of the User Guide, but that hasn't helped. Any suggestions on how to accomplish what I'm trying to do?

    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

  • 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

  • Conditional alternating row colors

    Hello
    I have a report of companies an their country which is ordered by the column country. I'd like to have a alternating row color for every new country and not for every new row as it is in custom settings.
    Is that possible? How can I do that?
    Regards Felix
    Edited by: Felix on 21.09.2011 12:33

    Hi Scott
    sorry, I still not quite understand how to do, because which row must be colored depends on the number of countries in the database and alphabetic order of the countries.
    For example I show you only the country row of an example report and its row color as it should be right of it (because you cannot color text in this forum):
    [Country Row] [Row color]
    Albania light blue
    Albania light blue
    Albania light blue
    Albania light blue
    Andorra light green
    Andorra light green
    Andorra light green
    Andorra light green
    Argentina light blue
    Australia light green
    Australia light green
    Australia light green
    Once some data rows are inserted with a new country it should look like this
    [Country Row] [Row color]
    Albania light blue
    Albania light blue
    Albania light blue
    Albania light blue
    Algeria light green (new data)
    Algeria light green (new data)
    Algeria light green (new data)
    Andorra light blue (color switched)
    Andorra light blue (color switched)
    Andorra light blue (color switched)
    Andorra light blue (color switched)
    Argentina light green (color switched)
    Australia light blue (color switched)
    Australia light blue (color switched)
    Australia light blue (color switched)
    Now the row color of rows beneath Algeria changed (in order to keep the alternating row color alternating)
    I hope I now pointed out my problem more clearly.
    Thanks
    Felix

  • Alternating row colors. How to?

    All,
    When I use the Report Wizard, I can get alternating row colors. How can I get the same effect, when I use the 'create report using my sql query' option?
    thanks
    sanjay

    Sanjay,
    It is the same way that you do in it wizard reports, specify the table row colors in the display options section for gettng alternating row colors.
    Thanks and Regards
    Balaji

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

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

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

  • Apex 4 -- Standard, Alternating Row Colors row highlight broken

    template: 14. Standard, Alternating Row Colors in apex 4.0 appears to have it mouse-over row highlight colors reversed (except for the first row, which is not highlighted)
    when first displayed, the rows are displayed white/gray/white...
    mousing over the first row does nothing, mousing out does nothing
    mousing over the 2nd row does nothing, mouse out changes it to white
    mousing over the 3rd row does nothing, mouse out changes it to gray
    etc

    I noticed this behavior too, very annoying. Did someone found a way to fix the template ?

  • How Get Alternating Row Colors To Work?

    I've searched this forum, searched online, and followed the directions in the Numbers 3.0 Help, but I just can't get the Alternating Row Colors function to work.  I'm using an iMac and a new Mac Mini, both running Mavericks, on a spreadsheet converted from Numbers '08.  I've seen several screenshots of tables in discussions on this forum that seem to have Alternate Row shading; presumably they were done with Numbers 3.0. So apparently, it can be done.  Need Help!

    Vistan wrote:
    Now I see it!  I did not have any of the Table Style boxes in the upper right cortner of the creen selected...when I choose one, the alternate row colors sudenly pop up.  I'm now experimenting with the Grid Lines and Header &Footer selection buttons.
    Vistan
    Vistan,
    I'm about as sure as I can be that Table Style boxes having being clicked has nothing to do with the Checkbox for Alternating color rows. I've been wrong before, but I can't grasp the logic on this one, and it doesn't happen here the way you describe.
    Jerry

  • Hide filter type - row in interactive report

    Hello all,
    how can I deactivate or hide the filter type - row in interactive report and the only option to be filter type - column?
    Is it possible with some javascript?
    Thanks in advance !

    The CSS approach works fine, but I made some improvements:
    1. CSS-Selector is case sensitive
    2. Only select the label with the attribute for="apexir_FILTER_TYPE". Attention: the CSS-Selector for the for-attribute works in IE and Firefox different
    /* Hide IR Filter Type Row */
    #apexir_FILTER_TYPE {
    display:none;}
    /* IE */
    label[htmlFor="apexir_FILTER_TYPE"] {
    display:none;}
    /* Firefox */
    label[for="apexir_FILTER_TYPE"] {
    display:none;}

  • Highlight current row on Interactive Report

    What is the best way to highlight (or identify) the current row in an Interactive Report?
    I’ve created an interactive report, based on a custom SQL query, with a link (on the primary key (id)) to give the user the possibility to select a certain record (that will show some additional regions with detail information). How can I identify (highlight, indicator) the selected row in an Interactive Report?
    Many thanks for your help,
    John

    I wanted the same without using jQuery. Roel's example set me on the right track. To ensure keeping my current row highligthing after using the pagination links I've managed to dynamicly modify the pagination link in the IR using javascript, but I have a little (I hope) problem left.
    I've managed to change the pagination link when rendering the page from
    <a h ref="javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')"></a>to
    <a h ref=javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15');highLight(this)></a>Unfortunatly my added code does not notice the changes made by the gReport.navigate.paginate code. It does only work when I add an alert (); in my highLight code. This alert will force showing the changes made in the DOM-model by gReport, allowing the highLight function to re-exame the DOM-model and change the pagination link.
    Anyone an idea how to overcome this problem ?
    Kind regards,
    Ralph

Maybe you are looking for

  • How to cusotmize the attribute of being mandatory for master data and order

    Hi,everyone how to make the  un-mandatory field on the verdor master data mandatory? Also, How  to set to define my own mandatory fields on  purchase order?   I also need to remove the mandatory setting which is pre-set by the system on many docutmen

  • How to prompt for user input in PL/SQL

    How do I prompt for user input in PL/SQL? I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither? If the user chooses

  • The trash, inbox, compose menu is missing

    The left side menu with the trash and inbox folders and the compose menu option are missing. This only happens on my computer, an ACER aspire. How can I change the settings to get it back?

  • Imac Mise en veille Réagit plus

    Bonjour, Depuis une semaine, mon Imac 21" (sous Lion) ne réagit plus lors de sa mise en veille prolongée automatique. Le Imac continue pourtant à tourner mais le clavier et la souris ne permettent pas de le faire réagir. (J'ai un clavier et une souri

  • Transfer ipod touch to new account

    My son just received a new computer for Chirstmas and he was using my iTunes account for music and apps.  He just created his own account and my question is can I move his music and apps from his iPod Touch to his new account.  If so, how can I do it