• lklein (5/8/2008)


    I get an error - Next control variable does not match For Loop control variable 'sParamItem' should I be customizing any of the function in the code property?

    This is the exact code I'm using in my library:

    Public Shared Function ReturnXML(ByVal MultiValueList As Object, ByVal Root As String, ByVal Node As String, ByVal Element As String) As String

    '**************************************************************************

    ' Returns an XML string by using the specified values.

    ' Parameters:

    ' MultiValueList - a multi value list from SSRS

    ' Root, Node, Element - String to use in building the XML string

    '**************************************************************************

    Dim ReturnString = ""

    Dim sParamItem As Object

    ReturnString = " "

    For Each sParamItem In MultiValueList

    ReturnString &= " "

    Next

    ReturnString &= " "

    Return (ReturnString)

    End Function

    to use in the Code section of the report, remove the "public shared"

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2