Link to home
Start Free TrialLog in
Avatar of kalittaair
kalittaair

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalittaair
kalittaair

ASKER

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!
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)