I am trying to add alternative colours on the column in my report. I have a matrix with a group on the column I want to alternate. I've used the following within the report properties code:
Private bOddRow(10) As Boolean
Function AlternateColor(ByVal OddColor As String, ByVal EvenColor As String, ByVal Toggle As Boolean, ByVal Type AS INTEGER) As String
If Toggle Then bOddRow(Type) = Not bOddRow(Type)
If bOddRow(Type) Then
Return OddColor
Else
Return EvenColor
End If
End Function
And the following within the cells background colour property
=code.AlternateColor("White","Silver",0, 1)
From the following thread - Add alternating row color to SQL Server Reporting services report
My table is set out as follows table example
The [VALUE] field is the cell I'm adding the colour formatting to. For the table example the colours are coming out in a checkerboard effect. However another table I have where the row group and column group are switched ([MATCHING_NAME] and [NAME]) it works fine. I can't figure out why, any suggestions?