Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to Display Print Preview and Print the Pivot Grid

The following code snippet demonstrates how to create a report link for the pivot grid control and display the print preview window by using a TdxComponentPrinter component. This component is shipped with the ExpressPrinting System which is a separate product.

var
  APivotGridReportLink: TBasedxReportLink;
begin
  // Creates a report link for the pivot grid control and adds it to a component printer.
  APivotGridReportLink := dxComponentPrinter1.AddLink(PivotGridControl);
  // Invokes the print preview window.
  dxComponentPrinter1.Preview(True, APivotGridReportLink);
end;

The result is shown in the image below.