4 Replies Latest reply: Sep 3, 2012 11:59 AM by Miguel Angel Baeyens de Arce RSS

    Conditionally colour rows in a TableBox

      Is there a way to conditionally colour in a row in a TableBox?

       

      For example, if I have a column with a 1, 2 or 3 in it, can I write an expression to set the colour of the row with a 1 to red, the colour of a row with 2 to blue and the colour of a row with 3 to yellow?

        • Re: Conditionally colour rows in a TableBox
          whiteline _

          You can but for the color of the cell.

          Expand your expression and type an expression for Background color.

           

          To colorize the row you should do it for every expression and also for every dimension.

            • Re: Conditionally colour rows in a TableBox

              I've created an expression on my tablebox called M_Seconds which contains a calculated number of seconds. It's set to 'hidden' in the presentation tab. How should I colour in one or more cells based on this expression?

               

              For example, on the Presentation tab I picked one of the columns, selected 'Conditional' and then entered this expression:

               

              if (CallRef='36207',Red())

               

              expecting this to change the background color of the cell to red but it didn't do anything.

            • Re: Conditionally colour rows in a TableBox
              Miguel Angel Baeyens de Arce

              Hi,

               

              You can use either the Style tab in the object properties, and set it to Pyjama-something that will display automatically one line in one color and the next in a different one, or enable the Design Grid in the View menu, and right click on the table box selecting "Custom Format Cell" and setting a conditional color.

               

              Another option is to use a Pivot table instead of a table box, so you can use the dimension and expression formats as mentioned above.

               

              Hope that helps.

               

              Miguel