locked
green-bar effect not working RRS feed

  • Question

  • I am running XP SP3.  VS 2008.  System has all the latest updates.
    I am using the code posted on msdn to apply the green-bar effect to my report.
    I am applying this to the detail row, but am unable to get the code to do anything visible in the report.

    this is the code:  =iif(RowNumber(nothing) Mod 2, "LightGray", "White")

    any idea why?


    Duane Sanders
    Monday, August 24, 2009 8:40 PM

Answers

  • Duane,
    Try this:
    =iif(RowNumber(Nothing) Mod 2 = 0, "LightGrey", "White")

    This is due to a mismatch in the color names.

    Thanks.

    Stella Chan
    SQL Server Reporting Services

    ------------------

    This post is provided as-is with no warranty or support.
    • Proposed as answer by StellaC - MSFT Tuesday, September 1, 2009 7:12 PM
    • Marked as answer by Duane Sanders Tuesday, September 1, 2009 7:57 PM
    Tuesday, September 1, 2009 7:12 PM

All replies

  • Are you trying to do interlaced rows?  If yes, give this a try.

    =iif(RowNumber(Nothing) Mod 2 = 0, "LightGray", "White")

    Thanks.

    Stella Chan
    Program Manager
    SQL Server Reporting Services

    -------------

    This post is provided as-is with no warranty or support.
    • Proposed as answer by StellaC - MSFT Tuesday, August 25, 2009 11:30 PM
    • Unproposed as answer by Duane Sanders Wednesday, August 26, 2009 5:02 PM
    Tuesday, August 25, 2009 11:30 PM
  • Where do you place the above referenced code? Thanks!
    Wednesday, August 26, 2009 10:44 AM
  • the expression is placed in the properties of the Table Details Row > BackgroundColor.

    I can display other colors like LightSteelBlue, but it will not display LightGray.

    I tried your code also StellaC, but it didn't work either.

    Duane Sanders
    Wednesday, August 26, 2009 4:45 PM
  • Duane,
    Try this:
    =iif(RowNumber(Nothing) Mod 2 = 0, "LightGrey", "White")

    This is due to a mismatch in the color names.

    Thanks.

    Stella Chan
    SQL Server Reporting Services

    ------------------

    This post is provided as-is with no warranty or support.
    • Proposed as answer by StellaC - MSFT Tuesday, September 1, 2009 7:12 PM
    • Marked as answer by Duane Sanders Tuesday, September 1, 2009 7:57 PM
    Tuesday, September 1, 2009 7:12 PM
  • Stella,

    You are right!
    Great eyes!
    It looks like the expressions wizard color palette has the color as "LightGray" and the properties color palette has the color as "LightGrey". 
    Weird....all of the other colors are spelled with "gray"......something else to remember....:)

    thanks 

    Duane Sanders
    Tuesday, September 1, 2009 8:02 PM
  •      Stella,

     

         Is there a way I could change the background color every five lines?

     

         Thanks,

     

        Wáscar.

    Friday, October 7, 2011 1:54 PM