Tuesday, January 1, 2013

Alternate table row coloring in BIRT

Clients may require to have alternate colors for table rows in the report. 
This can be achieved by a configuration in BIRT tool.

1.      Open the Report design file in the BIRT for which you need to add alternate row coloring. The Report preview looks like the below screen.

2..    Navigate to Layout tab, Select the table from the outline view.


3..    The on the properties editor, click the Highlight tab. 


4.   Click Add.You will see three drop downs. Just type “row.__rownum % 2” in the first drop down. Select the “Not Equal to” from the second and then type 0 in the third.

            We can also modify the color pattern by this condition “row.__rownum % 2 – Equal to – 0”



5. Then you set the background color of the row to whatever color you want. In this case, silver color is used.


6.    Now, we can preview the report after the row coloring is done.

No comments:

Post a Comment