unexplained error whole toggling visibility


Using SSRS 2008.

This is odd. I'm trying to toggle the visibility of a single row based on a field property of another row in the same table.

Here is my Expression in the Row Visibility section:

Here is my Custom Function:
Public Function ShowRow(ByVal sAction As String) As Boolean
sAction = sAction.ToLower
If sAction = "update" Then
      Return False
      Return True
End If
Return Nothing
End Function

Here is the error:
"The Visibility.Hidden expression for the tablix 'Tablix1' contains an error: [BCS30451] Name 'ShowRow' is not declared.

Any ideas why?

Who is Participating?
Nico BontenbalConnect With a Mentor Commented:
You need to use:
kalittaairAuthor Commented:
That worked. Strange though. I've got several custom functions in this report but have never had to do that before. Is it because I am referencing fields from another row?

Nico BontenbalCommented:
I think it is strange that it works without the Code. sometime. When you read the documentation at:
it clearly states:
Methods in embedded code are available through a globally defined Code member. You access these by referring to the Code member and the method name. The following example calls the method ToUSD, which converts the value in the StandardCost field to a dollar value:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.