ReportingService2010.GetItemDefinition Method (String)


Retrieves the definition or content for an item. This method applies to the Report, Model, Dataset, Component, Resource, and DataSource item types.

Namespace:   ReportService2010
Assembly:  ReportService2010 (in ReportService2010.dll)

	RequestNamespace := "",
	ResponseNamespace := "",
	Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)>
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)>
Public Function GetItemDefinition (
	ItemPath As String
) As Byte()


Type: System.String

The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

Return Value

Type: System.Byte()

The item definition as a Base 64-encoded byte array. For more information about this data type, see "Byte Structure" in the Microsoft .NET Framework documentation.

The table below shows header and permissions information on this operation.

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

Depends on the item type:

SharePoint Mode Required Permissions


Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols

Class Sample

    Public Shared Sub Main()

        Dim rs As New ReportingService2010()
        rs.Url = "http://<Server Name>" + _
        rs.Credentials = _

        Dim reportName As String = "http://<Server Name>" + _
            "/Docs/Documents/AdventureWorks Sample Reports" + _
            "/Sales Order Detail.rdl"
        Dim reportDefinition As Byte() = Nothing
        Dim doc As New System.Xml.XmlDocument

            reportDefinition = rs.GetItemDefinition(reportName)
            Dim stream As New MemoryStream(reportDefinition)

            Dim myDocumentsFolder As String = _
            doc.Save(Path.Combine(myDocumentsFolder, _
                "Sales Order Detail.rdl"))

        Catch e As SoapException
        Catch e As IOException
        End Try

    End Sub

End Class
Return to top