Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Getting Started
 [Expand]Fundamental Concepts
 [Collapse]Concepts
  [Collapse]Report Types
    Static Report
    Table Report
    Master-Detail Report
    Multi-Column Report
    Cross-Tab Report
    Side-by-Side Reports
    Drill-Down Report
    Drill-Through Report
    Mail-Merge Report
    Labels
    Combining Reports
    Chart-Based Report
    Parameterized Report
    Invoice Report
    E-Form Report
    Polling Report
  [Expand]Report Controls
  [Expand]Platform-Specific Reporting
  [Expand]Creating Reports
  [Expand]Storing Reports
  [Expand]Publishing Reports
  [Expand]End-User Reporting
  [Expand]Application Appearance
  [Expand]Migration to XtraReports
 [Expand]Design-Time Features
 [Expand]Examples
  End-User Capabilities
 [Expand]Localization
 [Expand]Redistribution and Deployment
 [Expand]API Reference
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Combining Reports

You can merge pages from different report documents to create a single combined report document. Afterwards, you can print and export the resulting document as a whole.

You can combine more than two reports and there are no limits regarding page order. It is possible to preserve the page settings, as well as page orientation from the original reports.

The following image illustrates a document created out of two different reports.

Calling the XtraReport.CreateDocument method generates a paginated document for a particular report, after which its pages can be accessed via the XtraReport.Pages property. To merge two or more reports, you need to create their documents and manage their collections of pages.

To recalculate page numbers after changing a report's collection of pages, enable the PrintingSystemBase.ContinuousPageNumbering property. To preserve the original page numberings, disable this property.

This example illustrates using the XtraReport.Pages property to solve different tasks.

Note

Because the resulting document does not create a "deep copy" of merged documents, you should not dispose of merged documents before the resulting document has been published.

The code below demonstrates how to add all pages of one report to the end of another report.

Note

Composite report documents created from multiple merged documents cannot be exported to file formats that support a continuous (table-like) layout (such as TXT or CSV).

As a workaround, use subreports to combine multiple XtraReport to a single document. Alternatively, export all your reports to CSV and TXT files separately and then join all the exported data to a single file.

The code below demonstrates how to merge pages of two reports into a single report, page-by-page.

The code below demonstrates how to reorder report pages so that it can be printed as a booklet (first page, last page, second page, last but one, third page, etc.)

Expanded See Also

How would you rate this topic?​​​​​​​