Friday, February 24, 2012

conditional color formatting

i'm using SQL Server Reporting Services 2005 and have a simple report that
essentially pulls back a bunch of database records and displays the results
in the excel-like grid. I want to shade an entire row, based on the value
of a field contained in that row, but i can't figure out where (and how) to
do this.
any help is much appreciated..
tia
jtOn Apr 3, 6:26 pm, "JTL" <j...@.clickstreamtech.com> wrote:
> i'm using SQL Server Reporting Services 2005 and have a simple report that
> essentially pulls back a bunch of database records and displays the results
> in the excel-like grid. I want to shade an entire row, based on the value
> of a field contained in that row, but i can't figure out where (and how) to
> do this.
> any help is much appreciated..
> tia
> jt
In the Layout view, select the left-most cell in the table and click
F4 (for the Properties window). Below the Appearance property, in the
Properties window, select '<Expression...>' from the drop-down list to
the right of 'BackgroundColor.' Enter something like the following
below 'Edit Expression:'
=iif(Fields!FieldName.Value <> SomeValue, "BackgroundColorIfTrue",
"BackgroundColorIfFalse")
Then select the cell directly to the right of the left-most one and
repeat the same steps. Continue in this manner until all cells all the
way across have the same expression used.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment