Hi All,
I have a table containing 21 columns. I want to alternate the color on the rows, to make it more radable and nocer to the eye. As such I set the BackgroundColor property on the entire TableRow (so it is applied to every textbox) to the following:
Code Snippet
=iif(RowNumber(nothing)Mod 2,"LightGray","White")
In theory it should work. I checked a few of the texboxes to make sure everything was okay and indeed the BackgroundColor property on each one of them was properly set to the above expression.
When I tried to build the report, I was prompted by 21 errors (one per textbox) stating the following:
[rsCompilerErrorInExpression] The BackgroundColor expression for the textbox 'FIELDNAME' 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'.
Obviously the TruePart parameter has been specified ("LightGray" in my expression), so what could be wrong?
Thanks in advance for the help
Idelso
Hello,
Your function is good. Check the spelling of "LightGray". Try "LightGrey".
Regards...|||Hi asiaindian,
Unfortunately that didnt do the trick. This time around a went with much simpler, one word, color names and still nothing.
The error messages keep popping up.
Code Snippet
=iif(RowNumber(nothing)Mod 2,"Silver","White")
Thanks,
Idelso
|||Well, I found the solution to the problem, for those of you who might have to face it in the future....it is a very simple fix.
Amazing what a great "compiler" SSRS has (I am being sarcastic for the record).
It so happens that you can enter the expression as previously shown without the system indicating any syntax problem with it. Well, we are wrong, the only way this is going to be built is if you keep a space between your RowNumber function call and the "Mod" call. So the correct format is:
Code Snippet
=iif(RowNumber(nothing) Mod 2, "Silver","White") (Pay attention to the space between (nothing) and Mod)Yup, this was the problem.....interesting
Idelso
No comments:
Post a Comment