New to Telerik ReportingStart a free 30-day trial

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.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

C#
public class ReportPackager

Inheritance: objectReportPackager

Constructors

Initializes a new instance of the ReportPackager class.

C#
public ReportPackager()

Methods

Packages the specified report instance and writes the package to the specified Stream.

C#
public void Package(IReportDocument report, Stream targetStream)
Parameters:reportIReportDocument

The Report object to package.

targetStreamStream

The target stream to write the packaged document.

Remarks:

Use the targetStream parameter to specify an object that derives from the Stream class, which is designed to write to streams. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.

C#
public void Package(string xmlDefinition, Stream targetStream)
Parameters:xmlDefinitionstringtargetStreamStream

Unpackages the TRDP document contained by the specified Stream.

C#
public Report Unpackage(Stream packageStream)
Parameters:packageStreamStream

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 Stream class, which is designed to write to streams. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.

Unpackages the TRDP and TRBP documents contained by the specified Stream.

C#
public IReportDocument UnpackageDocument(Stream packageStream)
Parameters:packageStreamStream

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 Stream class, which is designed to write to streams. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.