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]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Collapse]Printing and Exporting
     Tutorial: Printing and Exporting a Pivot Grid
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Printing and Exporting

Expanded Printing and Exporting Basics

The Pivot Grid control provides a fast and flexible way to bring its contents to the printed page, or export to a file or stream in various formats - PDF, RTF, XLS, etc. You must manually add the reference to the DevExpress.Xpf.Printing.v18.1 assembly. Otherwise, data printing and exporting are not allowed.

To preview the pivot grid, use the PivotGridControl.ShowPrintPreview and PivotGridControl.ShowPrintPreviewDialog methods. The Print Preview window allows you to customize the printed document, print it or export to a file in the required format.

The following table lists methods allowing you to export data:

Method Description
PivotGridControl.ExportToCsv Exports the pivot grid to the specified stream or file path in CSV format.
PivotGridControl.ExportToHtml Exports the pivot grid to the specified stream or file path in HTML format.
PivotGridControl.ExportToImage Exports the pivot grid to the specified stream or file path in image format.
PivotGridControl.ExportToMht Exports the pivot grid to the specified stream or file path in MHT format.
PivotGridControl.ExportToPdf Exports the pivot grid to the specified stream or file path in PDF format.
PivotGridControl.ExportToText Exports the pivot grid to the specified stream or file path in text format.
PivotGridControl.ExportToXls Exports the pivot grid to the specified stream or file path in XLS format.
PivotGridControl.ExportToXlsx Exports the pivot grid to the specified stream or file path in XLSX format.
PivotGridControl.ExportToXps Exports the pivot grid to the specified stream or file path in XPS format.

Expanded Printing Options and Settings

The DXPivotGrid provides multiple options, styles and templates, that allow you to customize the printed document.

The following table lists printing options:

Property Description
PivotGridControl.PrintColumnHeaders Gets or sets whether to print headers of the column fields. This is a dependency property.
PivotGridControl.PrintDataHeaders Gets or sets whether to print headers of the data fields. This is a dependency property.
PivotGridControl.PrintFilterHeaders Gets or sets whether to print headers of the filter fields. This is a dependency property.
PivotGridControl.PrintHeadersOnEveryPage Gets or sets whether to print field headers on every page. This is a dependency property.
PivotGridControl.PrintHorzLines Gets or sets whether the horizontal grid lines are printed. This is a dependency property.
PivotGridControl.PrintInsertPageBreaks Gets or sets whether to insert page breaks at the end of every page. This is a dependency property.
PivotGridControl.PrintLayoutMode Gets or sets the layout mode of the print document. This is a dependency property.
PivotGridControl.PrintRowHeaders Gets or sets whether to print headers of the row fields. This is a dependency property.
PivotGridControl.PrintUnusedFilterFields Gets or sets whether to print headers of the unused filter fields. This is a dependency property.
PivotGridControl.PrintVertLines Gets or sets whether the vertical grid lines are printed. This is a dependency property.

The following table lists the templates applied to DXPivotGrid elements when they are printed.

Expanded See Also

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