This is first page of a Resident.
So I just want to show #2 Rectangle in first page of each Resident and hide #2 in rest of pages like this:
I tried to use code:
Public Function IsFirstPage(resident as string, currentResident as Microsoft.ReportingServices.ReportProcessing.OnDemandReportObjectModel.Variable) as Boolean
If (resident<>currentResident.Value) Then
currentResident.Value = resident
Return True
Else
Return False
End If
End Function
and add expression for #2 as order to hide #2:
=IIf(Code.IsFirstPage(Fields!szFirstName.Value+Fields!szLastName.Value, Variables!currentResident), False, True)
It hid #2 in first page. However, I tested it by clicking Previous button and saw new issue appears: #2 is hidden till the first page.