unexplained error whole toggling visibility

Experts:

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:
=ShowRow(Fields!Process.Value)

Here is my Custom Function:
Public Function ShowRow(ByVal sAction As String) As Boolean
sAction = sAction.ToLower
If sAction = "update" Then
      Return False
Else
      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?

Thanks.
kalittaairAsked:
Who is Participating?
 
Nico BontenbalConnect With a Mentor Commented:
You need to use:
=Code.ShowRow(Fields!Process.Value)
0
 
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?

Thanks!
0
 
Nico BontenbalCommented:
I think it is strange that it works without the Code. sometime. When you read the documentation at:
http://msdn.microsoft.com/en-us/library/ms155798.aspx
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:
 =Code.ToUSD(Fields!StandardCost.Value)
0
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.