2 Replies Latest reply: Nov 8, 2013 7:18 AM by Uncle Buck RSS

    IR report highlight visible cell based on value of hidden column

    Uncle Buck

      I have an IR with a date column formatted as dd-mon-yy.  I have a requirement to change the background color of the date cell based on the day of the week (2=yellow, 3=Purple, etc), where Monday is day 2, Tuesday is day 3, etc.

       

      My idea on how to do this was to create a hidden column like this to_char(date_col, 'D'), but I can't set the background color of the date column based on the value of another column (the hidden column in this case). 

       

      Any ideas on how I can do this?  Can I use the Column Formatting/HTML Expression on the date column to set the background color; if yes, can you provide an example?

       

      Thank you.

        • 1. Re: IR report highlight visible cell based on value of hidden column
          883486

          Use column formatting

          <span class="custom#HIDDENCOL#">#COLTOHIGHLIGHT#</span>

           

          Add css to page

          <style>

          span.custom2{width:100%;display:block;background-color:yellow;  }

          span.custom3{width:100%;display:block;background-color:purple;  }

          </style>

          • 2. Re: IR report highlight visible cell based on value of hidden column
            Uncle Buck

            Thank you so much for the answer.  It worked perfectly except for one point.

             

            In the page CSS Inline box, I added the following code.  For some reason I had to repeat the first line, or else that formatting wasn't showing.  Works fine with the repeated line, but without the repeated line the yellow(#FFFF99) doesn't work.  Any ideas on why that would be.

             

            <style>

            span.custom2{width:100%;display:block;background-color:#FFFF99;  }

            span.custom2{width:100%;display:block;background-color:#FFFF99;  }

            span.custom3{width:100%;display:block;background-color:#BA69F0;  }

            span.custom4{width:100%;display:block;background-color:#99CCFF;  }

            span.custom5{width:100%;display:block;background-color:#FFDD44;  }

            span.custom6{width:100%;display:block;background-color:#99FF99;  }

            </style>