Display Reports with alternating style rows
|Product||Progress® Telerik® Reporting|
Many production level reports use an alternating row style as an aid to readability. This technique is used in the ProductCatalog sample report.
This look can be achieved with conditional formatting by setting up a rule that fires on every other line.
Select the detail section of your report.
Select the ConditionalFormatting property in the Context Menu or the Property Grid.
Click the New Rule button.
Enter the expression "= RowNumber()%2"
Select the equal "=" operator from the drop down list.
Enter the value as "=1".
Click the Style button.
Click the Background style item.
Enter the color as "#F0F0F0".
Click OK to close each of the open dialogs.
The same styling can be achieved with a Table/Crosstab/List. For the purpose at step 1 select all items in a row of the Table/Crosstab/List item, and proceed with the next steps.
The expression used at step 4 is a Data function working in a specific data scope, which depends on the report's layout. To assure the proper evaluation of the expression you can use the name of the report or a group as an argument for the RowNumber function (scope).