locked
background color doe not change if the column visibiity is set to true RRS feed

  • Question

  • Hi all, I have a report with alternating rows set to background color. white and silver. I have set this in the table properties for the entire row. 
    =IIF(rownumber(nothing) mod 2=1,"White","Silver")

    I also a column which is condiionally set to hidden . when this happens, it puts a white space on the column whereas rest of the row is silver. How do i change this column's bakground to silver.?
    the code in the visibility expression editor is:

    =IIF(Parameters!CanseereportDollars.Value=False,True,False)

    how to set the background color to Silver for the column?

    Thanks in advance

    Wednesday, March 25, 2009 10:51 PM

Answers

  • The problem you're having is that setting the visibility to hidden hides all the properties as well (including the background colour).

    Is it possible for you to make the cell (textbox) visible, but instead change the textbox's value to '=iif(Parameters!CanseereportDollars.Value=False,"",Fields!MyField.Value)'

    (where Fields!MyField.Value is whatever the value of the textbox was before this change)

    Paul
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Raymond-Lee Friday, April 3, 2009 7:32 AM
    • Marked as answer by Raymond-Lee Sunday, April 5, 2009 6:43 AM
    Thursday, March 26, 2009 4:41 AM
  • Hi,

     

    Paul is right, you hide the rows include the background color. One possible work-around I can think of is using filter in dataset level. Don’t use visibility expression in table control. Edit the dataset, set the filter like this: ParametersCanseereportDollars.Value  = True

     

    After that, setting color expression in the table control.

     

    Please let me know if this helps.

    Raymond

    • Proposed as answer by Raymond-Lee Friday, April 3, 2009 7:33 AM
    • Marked as answer by Raymond-Lee Sunday, April 5, 2009 6:43 AM
    Friday, March 27, 2009 3:19 AM

All replies

  • The problem you're having is that setting the visibility to hidden hides all the properties as well (including the background colour).

    Is it possible for you to make the cell (textbox) visible, but instead change the textbox's value to '=iif(Parameters!CanseereportDollars.Value=False,"",Fields!MyField.Value)'

    (where Fields!MyField.Value is whatever the value of the textbox was before this change)

    Paul
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Raymond-Lee Friday, April 3, 2009 7:32 AM
    • Marked as answer by Raymond-Lee Sunday, April 5, 2009 6:43 AM
    Thursday, March 26, 2009 4:41 AM
  • Hi,

     

    Paul is right, you hide the rows include the background color. One possible work-around I can think of is using filter in dataset level. Don’t use visibility expression in table control. Edit the dataset, set the filter like this: ParametersCanseereportDollars.Value  = True

     

    After that, setting color expression in the table control.

     

    Please let me know if this helps.

    Raymond

    • Proposed as answer by Raymond-Lee Friday, April 3, 2009 7:33 AM
    • Marked as answer by Raymond-Lee Sunday, April 5, 2009 6:43 AM
    Friday, March 27, 2009 3:19 AM