Table Alternating Color error SSRS

Hi Experts,

In my ssrs table, I want to add the alternating background color expression. I tried 2 different expressions, but get the error message.
In my report, there is no parameter setting. Thanks!!

"The BackgroundColor expression for the text box ‘DealerId’ contains an error: [BC30455] Argument not specified for parameter 'TruePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'."


The 2 kinds of expression I tried
=iif(RowNumber(Nothing) MOD2, "Silver","White")

=iif(RowNumber(Nothing) MOD2=1, "Silver",nothing)
tanj1035Asked:
Who is Participating?
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
<Potentially stupid answer>
You need a space between Mod and 2..
=IIF(RowNumber(Nothing) Mod 2, "White" , "Gainsboro")
0
 
tanj1035Author Commented:
Thanks!!! It works!  I asked a stupid question .
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Far better to ask us suckers for points stupid questions, as we'll cheerfully answer them, then to ask your co-workers and have them wonder why you're asking stupid questions.

Thanks for the grade.  Good luck with your report.  -Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.