Banded Column Colors

  • Hi

    I have a data set that shows employees, dates, and sales

    Employee........Date..............Sales

    Raul...............2013-12-01.....100

    Raul...............2013-12-02.....150

    Raul...............2013-12-07.....350

    Jose...............2013-12-01.....150

    Jose...............2013-12-05.....100

    Jose...............2013-12-06.....50

    Pedro.............2013-12-04.....100

    Pedro.............2013-12-07.....400

    (i dont know how to format a table)

    I want a report to look like

    ..............2013-12-01.....2013-12-02.....2013-12-03.....2013-12-04.....2013-12-05.....2013-12-06.....2013-12-07

    Raul........100................150.......................................................................................................350

    Jose........150.................................................................................100................50

    Pedro.......................................................................100............................................................400

    So I have a column group on dates

    and I have a row group on employee

    I want to be able to color the weekend a different color than the weekdays.

    What I've been doing so far is, I have an expression per cell to set the background color. If the day of the week is 1 or 7, color it red, else blue.

    The problem I have is that, if I have no data for that day for that person, I can't get the red.

    For example, Pedro on 2013-12-01. He has no row/data for that day so that cell wont get colored red.

    Any suggestions?

  • The value should not matter as you are testing the date for the column.

    Please post the expression you are using.

    An example would be

    =Choose(Weekday(Fields!Date.Value),"Red","Blue","Blue","Blue","Blue","Blue","Red")

    Far away is close at hand in the images of elsewhere.
    Anon.

  • I'm using

    =iif(Weekday(Fields!Date.Value)=1 OR Weekday(Fields!Date.Value)=7 ,"red", "Blue")

    The expression you posted is doing the same thing.

    Is there a way I can get the value of the column when I have no data for that cell?

    Is there a different way to set the color that affects the entire column instead of doing all the cells individually?

    Thanks

  • Is there a way I can get the value of the column when I have no data for that cell?

    Why?

    Because you are using a matrix when you apply fill to the cell it applies to the whole column unless you specifically write the expression to do otherwise.

    Is there a way I can get the value of the column when I have no data for that cell?

    If the cell has no data then the value will be Nothing, ie =IsNothing(Fields!Sales.Value) will yield true

    You can use this in the Fill expression if, for example, you wanted the background to white if no value.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Try this:

    =IIF(Weekday(ReportItems!HeaderDate.Value) = 1 Or Weekday(ReportItems!HeaderDate.Value) = 7,"Red","Blue")

    and remember to change HeaderDate with the textboxId of the columnGroup

    Let me now if it works

  • Yup that worked.

    Thanks! Now on to next set of problems.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply