Posted 5 December 2023, 10:15 am EST
We are converting to rdlx from rdlc. We have some code to provide banding to tabular output. The code does not work in the rdlx, and I can’t figure out why. The function is called in the background color expression of two textboxes, and I have confirmed the function IS being called every time. But the when the function is called with Toggle = true by the first column, the color toggles, but it does not for the subsequent columns in the row (Toggle = false). The code is below, screenshots, the rdlx, and the rdlc are attached.
[code]
Private bOddRow as Boolean
Function AlternateColor( ByVal OddColor As String, _
ByVal EvenColor As String, _
ByVal Toggle As Boolean )
If Toggle Then bOddRow = Not bOddRow
If bOddRow then
return OddColor
Else
return EvenColor
End If
End Function
[/code]banding.zip