We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Trying to toggle tablix visibility based on expression

kalittaair
kalittaair asked
on
Medium Priority
1,320 Views
Last Modified: 2012-05-11
Experts,

Using SSRS 2008.

I'm trying to toggle the visibility of a tablix based on whether or not a piece of data is contained within any one of 9 fields returned by a proc. the piece of data is "Change: ".

The function below always returns "True" even if one of the IF statements should resolve to true (thus returning false and displaying the tablix).

Here is my custom code:
Public Function ShowMore(ByVal sData As String, ByVal sData2 As String, ByVal sData3 As String, ByVal sData4 As String, ByVal sData5 As String, ByVal sData6 As String, ByVal sData7 As String, ByVal sData8 As String, ByVal sData9 As String) As Boolean
If sData.Contains("Change: ") = True Then
	Return False
End If
If sData2.Contains("Change: ") = True Then
	Return False
End If
If sData3.Contains("Change: ") = True Then
	Return False
End If
If sData4.Contains("Change: ") = True Then
	Return False
End If
If sData5.Contains("Change: ") = True Then
	Return False
End If
If sData6.Contains("Change: ") = True Then
	Return False
End If
If sData7.Contains("Change: ") = True Then
	Return False
End If
If sData8.Contains("Change: ") = True Then
	Return False
End If
If sData9.Contains("Change: ") = True Then
	Return False
End If
Return True
End Function

Open in new window


And here is my calling expression in the tablix visibiliy area:
=Code.ShowMore(Fields!LatitudeDegrees.Value, Fields!LatitudeMinutes.Value, Fields!LatitudeSeconds.Value, Fields!OfEquator.Value, Fields!LongitudeDegrees.Value, Fields!LongitudeMinutes.Value, Fields!LongitudeSeconds.Value, Fields!OfGreenwich.Value, Fields!FIR.Value)

Open in new window

Any idea what I'm doing wrong?

Thanks in advance!
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.