Alternate Row Shading

  • I want to add alternate row shading to make it easier to the user to read, but the syntax I tried below doesn't return any shading. Let me just say that I googled this and it was the syntax it said to use.

    =iif(RowNumber(Nothing) Mod 2, "Sliver", "White")

    Does anyone know how to make it work?

    thx,

    John

  • John,

    First, make sure of your spelling. Hopefully you have "silver" and not "sliver" in your actual expression.

    Second, make sure you have the expression in the background color property for the row and not for each individual textbox. SSRS just gets real flaky when you do that.

    This is the syntax I use:

    For colored background on odd number rows:

    =IIF(RowNumber(nothing) mod 2=1,”Silver”,nothing)

    For colored background on even number rows:

    =IIF(RowNumber(nothing) mod 2=0,”Silver”,nothing)

    If you're trying to do this for group headers you need this expression:

    =iif(RunningValue(Fields!GroupField.Value ,CountDistinct,Nothing) Mod 2, "Silver", "Transparent")

    HTH a little

    [font="Comic Sans MS"]toolman[/font]
    [font="Arial Narrow"]Numbers 6:24-26[/font]

  • It's likely that your misspelling of 'Silver' is causing the report to show no formatting.

  • yup, that was it. Beautiful. thx.

  • Thanks toolman

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

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