Forum Discussion

JenniferSilbers's avatar
JenniferSilbers
Qrew Trainee
3 years ago

Trying to alternate row colors based on creating a new row number

Hello,

I am trying to create a report that has alternating colors for the rows.  I can't us the record Id because the Record ID is not in sequential order when filtered (as seen below).  I have been searching on how to create a new record number or something for the report itself to help do an alternating number or even/odd to use with a formula for colorizing rows, but not luck yet.  Hoping someone has encountered this problem and has a fix.  

Here is a sample of my report where I am trying to alternate colors.  My report can change weekly so I need something that will change with the report.   

Name Record ID# Date Quarter
Vixen 776 1/21/2022 Q1
Chicken 711 2/1/2022 Q1
Clothing 709 3/1/2022 Q1
Dip 721 3/1/2022 Q1
Mystery 750 3/1/2022 Q1
Mop 747 3/7/2022 Q1
Launch 736 3/17/2022 Q1
Launch Chicken 737 3/17/2022 Q1
Class 710 3/22/2022 Q1

Thanks

------------------------------
Jennifer Silberstein
------------------------------

3 Replies

  • Interesting question. There may be a solution using formula queries. Can you tell me the sort on your report?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Qrew Champion
      Assuming that the sort is by Date and then by Record ID# as a tie breaker, then thisw formula Numeric will give you the Row #

      var text Query = "{69.LTE.'" & [Date] & "'} AND {3.LTE.'" & [Record ID#] & "'}";
      Size(
      GetRecords($Query))

      Once you get that working, you can have a row colorization formula like 

      IF(REM([Row#],2)=0, "pink", blue")
      ā€‹

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        BTW, the 69 in my example is the Field ID for the Date field and the 3 is the Field ID for the Record ID# field (which is always 3).

        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------