Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [Collapse]Printing and Exporting
     Printing
     Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Printing

The PivotGridControl provides a fast and flexible way of bringing its contents to a printed page.

This topic demonstrates how to customize the printed version of the Pivot Grid Control, and lists the ways in which the pivot grid control can be printed. The document comprises the following subsections:

Note

Custom painting, alpha blending and color gradient features are not supported in the pivot grid control's printout.

Expanded Printing Basics

The Pivot Grid control provides its own methods to print displayed data, but these methods delegate the printing functionality to the DevExpress Printing Library. If this library cannot be found, the printing and exporting functionality is not available. To ensure that the Pivot Grid control can be printed/exported, check the PivotGridControl.IsPrintingAvailable property's value.

To print data from the Pivot Grid control, use the following methods.

Member Description
PivotGridControl.Print Prints the PivotGridControl.
PivotGridControl.ShowPrintPreview Opens the Print Preview window with a toolbar-based interface.
PivotGridControl.ShowRibbonPrintPreview Opens the Print Preview window with a Ribbon-based interface.

These methods print and show a print preview of the data displayed by the Pivot Grid control.

The following code snippet demonstrates how to display a Print Preview Ribbon window.

The image below illustrates the Preview window for a sample pivot grid.

Refer to the XtraPrinting Library documentation for more information on the functionality provided by the print preview window.

Expanded Modifying Print Appearances

By default, a printed pivot grid utilizes the same appearances as when it is displayed on screen. These appearance settings can be customized using the PivotGridControl.Appearance property. However, a Pivot Grid provides print appearances used to paint the pivot grid's visual elements (field headers, data cells, etc.) in print output. To use print appearances instead of display appearances when the pivot grid is printed, set the PivotGridOptionsPrint.UsePrintAppearance option to true.

Use the pivot grid's PivotGridControl.AppearancePrint property to set print appearances. This property provides access to the appearance settings for various Pivot Grid elements (for example, fields, data cells, etc.).

The appearance settings can be customized in the Print Appearances page of the PivotGrid Designer as well. You can save these settings to or restore these settings from an XML file.

Expanded Printing Options

The Pivot Grid provides a set of options that specify the Pivot Grid's elements to be printed, as well as the appearance settings to be used to paint these elements when the pivot grid control is printed. These options can be accessed as follows.

  • At design time using the Print Settings page of the PivotGrid Designer.

  • In code, using the PivotGridControl.OptionsPrint property.

  • By an end-user at runtime in the Print Options dialog invoked by clicking the "Options" menu command in the Preview window.

Expanded Example: How to Print a PivotGrid and Show its Print Preview

The following example demonstrates how to print the Pivot Grid control using the PivotGridControl.Print method and show its Print Preview window using the PivotGridControl.ShowPrintPreview method.

Note

Printing functionality depends on the DevExpress.XtraPrinting library. To verify that the library is available, use the PivotGridControl.IsPrintingAvailable property.

You can access print settings and modify them using the PivotGridControl.OptionsPrint property.

Expanded See Also

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