Monday, October 3, 2016

Change Row color in SSRS reports Ax2012

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.

Expression with value to be colorful is -

=IIF(Fields!FieldName.Value < 0, "Red", "Black") 

No comments:

Post a Comment

Conversion of Disposition code, code was not specified - Error in D365 F&O for inter company purchase order return

 We crated the return order for inter company purchase order  and created a Item Arrival Journal through Arrival Overview in corresponding c...