August 15, 2005 at 11:42 am
I am trying to create a embedded function that will accept a dataset field value and based on the value make an image visibility hidden or visible in the body of the report. Below is a sample of the embedded code.
Function VisibleYN(subject as string,passedyn as boolean) as double
if subject = "Math" then
mathimage.visibility = visible
end if
if subject = "Science" then
scienceimage.visibility = visible
end if
THe following expression is in the visibility property tab of the textbox that holds the subject.
code.visibleyn(fields!subject.value as string, passedyn as boolean)
Any help would be appreciated!
Marie
August 15, 2005 at 11:54 am
Sorry I forgot to mention the error I am received.
I receive an error that the mathimage is not declared. How do I reference an image in the body of the report. The field is within a list and based on the subject an image is displayed in the body of the report.
August 16, 2005 at 1:27 am
try this code:
Public Shared Function VisibleYN(ByVal Value As String) As Boolean
if subject = "Math" then
VisibleYN= True
else
VisibleYN=False
end if
if subject = "Science" then
VisibleYN= True
else
VisibleYN=False
end if
End Function
Then on mathimage.visibility u set the hidden property=code.VisibleYN(fields!subject.value)
August 16, 2005 at 6:39 am
There is a list of images (checkmarks) in the body of the report. THe databound textbox control that is evaluating whether the image should be visible is contained in a list. Based on the value in the textbox I would like to make the approriate image(checkmark) visible. Can I reference a report item in the body of the report to do something like reportitem.image.visible = true? If so how?
Your help is appreciated.
Marie
PS. It would really be great if report services had a checkbox control!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply