Color alternate row table report

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered
Is there an easy way to color every other row of a table report? I have this table:




And I want to color every other row, so it's more readable. I want it to look more like this

Photo of Jessica Haskins

Jessica Haskins

  • 366 Points 250 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of JimLieder

JimLieder

  • 188 Points 100 badge 2x thumb
Here's an answer that was posted a few years ago that will help:
https://community.quickbase.com/quickbase/topics/coloring-alternate-row
Photo of Jessica Haskins

Jessica Haskins

  • 366 Points 250 badge 2x thumb
Oops sorry I realized I just renamed the record ID. I tried the formula, but it doesn't display correctly, because the report is filtered based on a condition. So it shows up like this
Photo of Jessica Haskins

Jessica Haskins

  • 366 Points 250 badge 2x thumb
Thanks Jim, but I deleted my record ID # field, so I can't use the formula 

If(Rem([Record ID#], 2)=0, "#EvenColor", "#OddColor")
Photo of JimLieder

JimLieder

  • 188 Points 100 badge 2x thumb
Every table needs a Record ID# field.  You have probably just renamed it to something else.

Look at your list of fields in the table, and you'll see one field with the gold key icon.  You can use that field name instead of Record ID#

Photo of Gary Boyd

Gary Boyd

  • 800 Points 500 badge 2x thumb
I would also like to know the answer to this. Running formulas to display selected records, so odds/ evens color solution will not work. Thanks.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,512 Points 20k badge 2x thumb
There are class "od" and "ev"  on the odd and even rows of a table report  you can use for selectors.
Using IOL on the report you can set even rows to have a gray background with code similar to this:

$("table.searchResults tr.ev").css({backgroundColor: "#f2f2f2"});

Photo of Gary Boyd

Gary Boyd

  • 800 Points 500 badge 2x thumb
Thanks - using your techniques of oil and bol seems to open up a lot of options.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,242 Points 20k badge 2x thumb
and staying native closes down options.