Skip to main content

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.