ReportingService2005.GetReportDefinition Yöntemi
Bir raporun rapor tanımı alır.
Ad Alanı: ReportService2005
Derleme: ReportService2005 (ReportService2005 içinde.dll)
Sözdizimi
'Bildirim
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", 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("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Function GetReportDefinition ( _
Report As String _
) As Byte()
'Kullanım
Dim instance As ReportingService2005
Dim Report As String
Dim returnValue As Byte()
returnValue = instance.GetReportDefinition(Report)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", 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("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public byte[] GetReportDefinition(
string Report
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", 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"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
array<unsigned char>^ GetReportDefinition(
String^ Report
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", 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("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member GetReportDefinition :
Report:string -> byte[]
public function GetReportDefinition(
Report : String
) : byte[]
Parametreler
- Report
Tür: System.String
Rapor tam yol adı.
Dönüş Değeri
Tür: array<System.Byte[]
Rapor tanımı bir Base 64 ile kodlanmış bir bayt dizisi olarak.Bu veri türü hakkında daha fazla bilgi için bkz: "Bayt yapısı" Microsoft.net Framework belgeleri.
Açıklamalar
Aşağıdaki tablo üstbilgi ve izinler bu işlemi gösterir.
soap üstbilgileri |
(Giden)ServerInfoHeaderValue |
Gerekli izinler |
Örnekler
Bu kod örneği derlemek için Raporlama Hizmetleri wsdl başvuran ve belirli ad alanları almak gerekir.Daha fazla bilgi için, bkz. Compiling and Running Code Examples.Aşağıdaki kod örneği GetReportDefinition yöntem bir rapor tanımı almak ve yerel dosya sistemindeki bir xml belgesi olarak depolamak için:
Imports System
Imports System.IO
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim reportName As String = "/SampleReports/Company Sales"
Dim reportDefinition As Byte() = Nothing
Dim doc As New System.Xml.XmlDocument
Try
reportDefinition = rs.GetReportDefinition(reportName)
Dim stream As New MemoryStream(reportDefinition)
doc.Load(stream)
doc.Save("C:\Company Sales.rdl")
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
Catch e As IOException
Console.WriteLine(e.Message)
End Try
End Sub 'Main
End Class 'Sample
using System;
using System.IO;
using System.Web.Services.Protocols;
class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string reportName = "/SampleReports/Company Sales";
byte[] reportDefinition = null;
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
try
{
reportDefinition = rs.GetReportDefinition(reportName);
MemoryStream stream = new MemoryStream(reportDefinition);
doc.Load(stream);
doc.Save(@"C:\Company Sales.rdl");
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}
catch (IOException e)
{
Console.WriteLine(e.Message);
}
}
}