Thursday, March 29, 2012

Alternating background colors in table

Is there anyway to have alternating background colors in a table that is in a list? The existing methods I've seen work except that the tables don't always start with the same background color, as so:

BEGIN LIST
TABLE 1
(white background)
(gainsboro background)
(white background)

TABLE 2
(gainsboro background)
(white background)
(gainsboro background)
END LIST

Hopefully this gives you an idea of what I'm talking about. In table 2 above, the first row should have a white background, just like in table 1. It appears that SSRS treats all rows within a list as 1 table.

Is there any solution for this problem?

Hi,

try this:


=Iif(RowNumber(Nothing) Mod 2, "gainsboro ", "White")

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thanks Jens, but that's what I'm already using. The color alternates, but it doesn't distinguish between occurrences of the table within a single list.|||

THen you have to provide the scope in the paranthetes. So replace the word Nothing with the name of the scope.

HTH, Jens Suessmeyer


http://www.sqlserver2005.de

No comments:

Post a Comment