Programatically Show Hide Textboxes
I have a crystal report that I am having to convert over to SQL reporting services. In the Crystal report, I am able to programatically show/hide texboxes, however, I am running into a problem doing the same thing in SQL Reporting services. I have two textboxes side by side. One textbox is just a description of what is going to be showing in the next textbox along the lines of this
1st Textbox 2nd Textbox
Formula a2+b2=c2
I would like the text in the first box to have visibility of False when there is no value in the second textbox. I am using the following code but get the following error.
Public Function ShowBox() as Boolean
Dim ReturnValue as Boolean
If (Len(Fields!itm_Formula.Value)>0) Then
ReturnValue=True
Else
ReturnValue=False
End If
Return ReturnValue
End Function
In the Visibility expression section of Textbox1 I am referenceing that code with the following line:
=Code.ShowBox()
I am getting the following error when trying to run the report
[BC30469] Reference to a non-shared member requires an object reference.
Can anyone help with this?
|