Progress® Telerik® Reporting R3 2017

Package Report Definition

The ReportPackager serializes the report definition in XML and with a zip compression packages the definition and its resources. The resources are in their native format and archived for better performance. This way the definition is faster to handle and more compact. This is the default report document format for the Report Designers.

Packaging .TRDX report definition

The following sample code snipped demonstrates how to package a predefined .TRDX (XML) report definition:

var reportPackager = new ReportPackager();
using (var targetStream = System.IO.File.Create("PackagedReport2.trdp"))
{
    var xmlString = System.IO.File.ReadAllText("Report1.trdx");
    reportPackager.Package(xmlString, targetStream);
}

Packaging CLR report definition

The following sample code snipped demonstrates how to package a predefined CLR report definition:

var report = new Report1();
var reportPackager = new ReportPackager();
using (var targetStream = System.IO.File.Create("PackageReport1.trdp"))
{
    reportPackager.Package(report, targetStream);
}

Unpackaging

The following sample code snipped demonstrates how to unpackage a predefined .TRDP report definition:

var reportPackager = new ReportPackager();
using (var sourceStream = System.IO.File.OpenRead("Report1.trdp"))
{
    var report = (Report)reportPackager.UnpackageDocument(sourceStream);
}

See Also

Other Resources