AleksTr
AleksTr

Reputation: 77

Changing background colors of table cells (Visual Studio Reports 2008)

I have a report in Visual Studio Reports 2008. I created datasets to select values from ReportParameter (Place). Selected data from ReportParameter (Place) is used for displaying the report.

How can i change background color of table cells which equals to selected value from ReportParameter (Place)?

enter image description here

Upvotes: 0

Views: 837

Answers (1)

R. Richards
R. Richards

Reputation: 25161

This is easily done by setting the Background property on the cells you wish to highlight.

While in design mode, select the cells you want to highlight. In the Properties pane, look for the Background property, and set the Expression to something like the following.

=IIf(Fields!Place.Value = Parameters!Place.Value, "Yellow", "White")

The field name will vary, depending on what you have named yours. This checks to see if the current Place value is equal to the selected parameter value, and sets the Background to Yellow if they match, White if they do not.

This should work in any version of SSRS.

Upvotes: 3

Related Questions