Class ReportPackager
Packages and unpackages report documents in TRDP format. This is a zipped, XML-based file format for representing report documents. Starting with Telerik Reporting Q2 2016, the TRDP have become the default target file format for Telerik Report Designer and Telerik Report Server.
Inheritance
Inherited Members
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll
Syntax
public class ReportPackager
Examples
The following example demonstrates how to package a report definition instance:
The following example demonstrates how to package a XML report definition:
The following example demonstrates how to unpackage a .TRDP report definition:
Constructors
ReportPackager()
Methods
Package(String, Stream)
Declaration
public void Package(string xmlDefinition, Stream targetStream)
Parameters
System.String
xmlDefinition
|
System.IO.Stream
targetStream
|
Package(IReportDocument, Stream)
Packages the specified report instance and writes the package to the specified System.IO.Stream.
Declaration
public void Package(IReportDocument report, Stream targetStream)
Parameters
IReportDocument
report
The Report object to package. |
System.IO.Stream
targetStream
The target stream to write the packaged document. |
Remarks
Use the targetStream parameter to specify an object that derives from the System.IO.Stream class, which is designed to write to streams. Classes that derive from the System.IO.Stream class include: System.IO.BufferedStream, System.IO.FileStream, System.IO.MemoryStream, etc.
Unpackage(Stream)
Unpackages the TRDP document contained by the specified System.IO.Stream.
Declaration
public Report Unpackage(Stream packageStream)
Parameters
System.IO.Stream
packageStream
The stream that contains the package to unpackage. |
Returns
Report
The Telerik.Reporting object being deserialized. |
Remarks
Use the packageStream parameter to specify an object that derives from the System.IO.Stream class, which is designed to write to streams. Classes that derive from the System.IO.Stream class include: System.IO.BufferedStream, System.IO.FileStream, System.IO.MemoryStream, etc.
UnpackageDocument(Stream)
Unpackages the TRDP and TRBP documents contained by the specified System.IO.Stream.
Declaration
public IReportDocument UnpackageDocument(Stream packageStream)
Parameters
System.IO.Stream
packageStream
The stream that contains the package to unpackage. |
Returns
IReportDocument
The Telerik.Reporting object being deserialized. |
Remarks
Use the packageStream parameter to specify an object that derives from the System.IO.Stream class, which is designed to write to streams. Classes that derive from the System.IO.Stream class include: System.IO.BufferedStream, System.IO.FileStream, System.IO.MemoryStream, etc.