Método GetProperties
Retorna o valor de uma ou mais propriedades de um item do banco de dados do servidor de relatório.
Namespace: ReportService2005
Assembly: ReportService2005 (em ReportService2005.dll)
Sintaxe
'Declaração
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ItemNamespaceHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Function GetProperties ( _
Item As String, _
Properties As Property() _
) As Property()
'Uso
Dim instance As ReportingService2005
Dim Item As String
Dim Properties As Property()
Dim returnValue As Property()
returnValue = instance.GetProperties(Item, _
Properties)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ItemNamespaceHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public Property[] GetProperties(
string Item,
Property[] Properties
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ItemNamespaceHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
array<Property^>^ GetProperties(
String^ Item,
array<Property^>^ Properties
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ItemNamespaceHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member GetProperties :
Item:string *
Properties:Property[] -> Property[]
public function GetProperties(
Item : String,
Properties : Property[]
) : Property[]
Parâmetros
- Item
Tipo: System. . :: . .String
O nome de caminho completo ou a ID do item.
- Properties
Tipo: array<ReportService2005. . :: . .Property> [] () [] []
Uma matriz de objetos Property que contém as propriedades para as quais você deseja recuperar valores.
Valor de retorno
Tipo: array<ReportService2005. . :: . .Property> [] () [] []
Uma matriz de objetos Property que representa as propriedades do item especificado.
Comentários
The table below shows header and permissions information on this operation.
SOAP Headers |
(Out) ServerInfoHeaderValue |
Required Permissions |
Depends on the item type:
|
The default value that must be passed for this argument is the full path name. To supply an ID, you must set the ItemNamespaceHeader SOAP header. For more information, see Definindo o namespace Item para o método GetProperties.
Use the GetProperties method to retrieve the complete set of user-defined and reserved properties. To retrieve the standard subset of reserved properties, use the ListChildren method. For a list of the reserved properties of items in the report server database, see Propriedades do item do servidor de relatório.
If the Properties parameter is null Nothing nullptr unit uma referência nula (Nothing no Visual Basic) (Nothing in Visual Basic), all properties for the specified item are returned. These include all user-defined and built-in properties that are specific to the item.
You can pass the full path name of the item for the Item parameter or you can pass the ID of the item. For more information about using SOAP headers to accomplish this, see Usando cabeçalhos SOAP do Reporting Services.
Exemplos
To compile this 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 uses the GetProperties method to retrieve the description associated with the Company Sales report:
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
' Create the property to retrieve.
Dim retrieveProp As New [Property]()
retrieveProp.Name = "Description"
Dim props(0) As [Property]
props(0) = retrieveProp
Try
Dim properties As [Property]() = rs.GetProperties("/SampleReports/Company Sales", props)
Dim prop As [Property]
For Each prop In properties
' Writes the description to the console.
Console.WriteLine(prop.Value)
Next prop
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
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;
// Create the property to retrieve.
Property retrieveProp = new Property();
retrieveProp.Name = "Description";
Property[] props = new Property[1];
props[0] = retrieveProp;
try
{
Property[] properties = rs.GetProperties("/SampleReports/Company Sales", props);
foreach (Property prop in properties)
{
// Writes the description to the console.
Console.WriteLine(prop.Value);
}
}
catch ( SoapException e )
{
Console.WriteLine( e.Detail.InnerXml.ToString() );
}
}
}