ReportingService2005.GetReportDefinition Method
SQL Server 2005
Retrieves the report definition for a report.
Namespace: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
Assembly: ReportService2005 (in reportingservice2005.dll)
Assembly: ReportService2005 (in reportingservice2005.dll)
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://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 )
/** @attribute SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) */
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */
public byte[] GetReportDefinition (
String Report
)
SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetReportDefinition", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) public function GetReportDefinition ( Report : String ) : byte[]
Parameters
- Report
The full path name of the report.
Return Value
The report definition as a Base 64-encoded byte array. For more information about this data type, see "Byte Structure" in the Microsoft .NET Framework documentation.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 GetReportDefinition method to retrieve the definition of a report and store it as an XML document in the local file system:
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); } } }
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.