Log In
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
 [Expand]Product Information
 [Collapse]Creating Reports in Visual Studio
  [Expand]Adding a Report to Your .NET Application
  [Expand]Getting Started with DevExpress Reporting
  [Collapse]Detailed Guide to DevExpress Reporting
   [Collapse]Storing and Distributing Reports
     Reporting Security
    [Collapse]Storing Report Layouts and Documents
      Storing Report Layouts
      XML Serialization
      CodeDOM Serialization
      Custom Report Storage
      Saving Report Layouts
      Loading Report Layouts
      Merging the Pages of Different Documents
      Storing Report Documents
      Saving and Opening Report Documents
    [Expand]Globalizing and Localizing Reports
    [Expand]Adding Watermarks and Customary Information
    [Expand]Exporting Reports
     Printing Reports
   [Expand]Providing Data to Reports
   [Expand]Shaping Report Data
   [Expand]Report Navigation, Interactivity and Appearance
   [Expand]Reporting API
  [Expand]Detailed Guide to Visual Studio Report Designer
 [Expand]Creating End-User Reporting Applications
 [Expand]API Reference
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Merging the Pages of Different Documents

You can merge different documents' pages to produce a single composite document in code.

This example demonstrates how to access and customize a collection of document pages (XtraReport.Pages).


Do not dispose of the merged documents before publishing the resulting document (the resulting document does not create a "deep copy" of merged documents).

The following code appends an entire document to the end of another document:


Composite report documents created from multiple merged documents do not support continuous (single file) export. An attempt to export a composite document to a single file only exports its first merged document.

As a workaround, you can use subreports to display multiple reports in a single document, or you can export individual documents to separate files and then manually combine them into a single file.

The following code combines two documents into one document:

The following code reorders document pages to produce a booklet (first page, last page, second page, last but one, third page, etc.):


See Printing Reports to learn how to print your reports in applications created for different platforms.

Expanded See Also

Is this topic helpful?​​​​​​​