In the past I used Report Viewer 2010 and the following methode to alternate the Rows of a matrix:
---------------
1. Click Report >> Report Properties (or right click outside the bounds of your report within Design view and select Report Properties)
2. Click the Code tab and enter this custom function:
Public _evenRow As Boolean
Public Function EvenRow() As Boolean
_evenRow = Not _evenRow
return _evenRow
End Function
3. Right click your Tablix Row Group and select Row Group >> Group Properties.
4. Click the Variables tab and Add a new group variable.
Name: EvenRow
Value: =Code.EvenRow()
5. Now, instead of using the standard IIF(RowNumber… expression for the background color, use this expression for the background color of the row:
=IIF(Variables!EvenRow.Value=true,”Gray”,”White”)
Every things worked perfect!
---------------------
Now I changed from Report Viewer 2010 to Report Viewer 2012. The Reports are shown correctly, but the export to excel is not correct, just the first line is white all other lines are gray. (export to Word and PDF is still OK).
Is it a bug?
Please help me?
Thank you
Harry