How to format XML code into SSRS report

  • I have XML column, which I tried to convert into SSRS report format using below CODE().

    --------------------

    Public Function FormatXml(input As String) As String

    Dim doc As New System.Xml.XmlDocument()

    doc.LoadXml(input)

    Dim sb As New System.Text.StringBuilder()

    Dim settings As New System.Xml.XmlWriterSettings()

    settings.Indent = True

    settings.IndentChars = " " ' non-breaking spaces

    settings.NewLineChars = System.Environment.NewLine

    settings.NewLineHandling = System.Xml.NewLineHandling.Replace

    settings.OmitXmlDeclaration = True

    Using writer As System.Xml.XmlWriter = System.Xml.XmlWriter.Create(sb, settings)

    doc.Save(writer)

    End Using

    Return sb.ToString()

    End Function

    ----------------------

    ***************************

    The output is not coming as expected format. The expansion of Nodes (+) are not coming in in the SSRS report format. Please review the attached snapshots where result in orig_snap (Required) is not same as Result_snap (result).

    Could someone please help in to correct the format.

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply