SSRS Report: Alternate color for rows in ssrs
Set an Alternate Row Color in SSRS
In Short, expression for alternate color:
=IIF(RowNumber(Nothing) MOD 2,”LightGrey”, “LightBlue”)
Alternate Color for Group By cell
If you set alternate color for Group By cell, then the alternate color break down to the following rows. What it means is that, it does seems, alternate color is working properly. So the best option is
Set an Alternate Row Color in SSRS
=IIF(RowNumber(Nothing) MOD 2,”LightGrey”, “LightBlue”)
Alternate Color for Group By cell
If you set alternate color for Group By cell, then the alternate color break down to the following rows. What it means is that, it does seems, alternate color is working properly. So the best option is
- Remove the alternate for Group By cell
- Select the Group By cell
- Set the Background color property to: No color
- Repeat the steps 1 for all Group By list.
Set an Alternate Row Color in SSRS
In this article, I will show you how to set an alternate row color in Tablix in Report.
1. First of all Open any SSRS report which contains Tablix.
2. Now select Details Row from Tablix.
3. Then press F4 key or manually open property window. In property window select BackgroundColor Property. Then click on arrow button which is on right side and select Expression as shown in below screenshot.
4. An Expression window opens. In that window paste following expression. Then click on OK button.
=IIF(RowNumber(Nothing) MOD 2,”LightGrey”, “LightBlue”)
You can change color as par your requirement. Simply replace color used in above expression.
5. Now run your report. You will see results look like following screen shot:
6. Similarly if you want to change row background color in specific condition like you need to change row background color when Address contains Ct. In that situation use following expression.
=IIF(InStr(Fields!Address.Value,”Ct”)=0,”LightGrey”,”LightBlue”)
Now run your report. You will see output like following screen shot:
Congratulations! We successfully Set an Alternate Row Color in SSRS Report.
posted by Masud Ahmed @ <$BlogItemDateTime $> 0 Comments
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home