Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

How to set background color for alternate row in SSRS report table D365FO

Vijay Yelmame VY Profile Picture Vijay Yelmame VY 468
Setting Background Color for Alternate Rows in SSRS Report Table

Setting Background Color for Alternate Rows in SSRS Report Table

In this blog post, we will explore how to set the background color for alternate rows in an SSRS report table in Dynamics 365 Finance and Operations. This can be achieved using two different expressions:

1. Based on Unique Value in Table

To set the background color based on a unique value in the table, you can use the following expression:

=IIF(RUNNINGVALUE(Fields!FieldName.Value, CountDistinct, Nothing) Mod 2, "#ffffff", "#f0f0f0")

2. Based on Row Number

To set the background color based on the row number, you can use the following expression:

=IIF(RowNumber(Nothing) Mod 2, "#ffffff", "#f0f0f0")

Implementation

To implement these expressions in your SSRS report:

  1. Open your report in design in visual studio.
  2. Select the table where you want to apply the alternate row background color.
  3. Right-click on the data row (after table header) row and select Properties.
  4. In the BackgroundColor property, enter one of the expressions mentioned above.
  5. Click OK to apply the changes.

By following these steps, you can easily set the background color for alternate rows in your SSRS report table.

Please note - if you do the grouping on table then these background colors will also not show properly.


This was originally posted here.

Comments

*This post is locked for comments