共用方式為


ReportingService2005.ListExtensions 方法

Returns a list of extensions that are configured for a given extension type.

命名空間:  ReportService2005
組件:  ReportService2005 (在 ReportService2005.dll 中)

語法

'宣告
Public Function ListExtensions ( _
    ExtensionType As ExtensionTypeEnum _
) As Extension()
'用途
Dim instance As ReportingService2005 
Dim ExtensionType As ExtensionTypeEnum 
Dim returnValue As Extension()

returnValue = instance.ListExtensions(ExtensionType)
public Extension[] ListExtensions(
    ExtensionTypeEnum ExtensionType
)
public:
array<Extension^>^ ListExtensions(
    ExtensionTypeEnum ExtensionType
)
member ListExtensions : 
        ExtensionType:ExtensionTypeEnum -> Extension[] 
public function ListExtensions(
    ExtensionType : ExtensionTypeEnum
) : Extension[]

參數

傳回值

型別:array<ReportService2005.Extension[]
Returns an array of Extension objects that contains the available extensions.

備註

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

SOAP Headers

(Out) ServerInfoHeaderValue

Required Permissions

None

範例

To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples. The following code example retrieves a list of all supported data processing extensions that are currently installed on the report server:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService2005()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials
      ' Set the base Web service URL of the source server
      rs.Url = "https://servername/reportserver/reportservice.asmx"

      Dim extensions As Extension() = Nothing

      ' Retrieve a list of all supported data processing extensions. 
      Try
         extensions = rs.ListExtensions(ExtensionTypeEnum.Data)

         If Not (extensions Is Nothing) Then
            Dim extension As Extension
            For Each extension In  extensions
               Console.WriteLine("Name: {0}", extension.Name)
            Next extension
         End If

      Catch e As SoapException
         Console.WriteLine(e.Detail.OuterXml)
      End Try
   End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;

class Sample
{
   public static void Main()
   {
      ReportingService2005 rs = new ReportingService2005();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      Extension[] extensions = null;

      // Retrieve a list of all supported data processing extensions. 
      try
      {
         extensions = rs.ListExtensions(ExtensionTypeEnum.Data);

         if (extensions != null)
         {
            foreach (Extension extension in extensions)
            {
               Console.WriteLine("Name: {0}", extension.Name);
            }
         }
      }

      catch (SoapException e)
      {
         Console.WriteLine(e.Detail.OuterXml);
      }
   }
}

請參閱

參考

ReportingService2005 類別

ReportService2005 命名空間