Discussions

Expand all | Collapse all

Color alternate row table report

  • 1.  Color alternate row table report

    Posted 06-28-2018 17:46
    Is there an easy way to color every other row of a table report? I have this table:

    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1737961/RackMultipart20180628-127855-11fke1b-table_inline.PNG?1530204835">


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



  • 2.  RE: Color alternate row table report

    Posted 06-28-2018 18:49
    Here's an answer that was posted a few years ago that will help:
    https://community.quickbase.com/quickbase/topics/coloring-alternate-row


  • 3.  RE: Color alternate row table report

    Posted 06-28-2018 19:04
    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


  • 4.  RE: Color alternate row table report

    Posted 06-28-2018 18:52
    Thanks Jim, but I deleted my record ID # field, so I can't use the formula 

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


  • 5.  RE: Color alternate row table report

    Posted 06-28-2018 19:04
    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#



  • 6.  RE: Color alternate row table report

    Posted 07-03-2018 13:31
    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.


  • 7.  RE: Color alternate row table report

    Posted 07-03-2018 13:54
    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"});



  • 8.  RE: Color alternate row table report

    Posted 07-07-2018 07:27
    Thanks - using your techniques of oil and bol seems to open up a lot of options.


  • 9.  RE: Color alternate row table report

    Posted 07-09-2018 09:39
    and staying native closes down options.