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 Tree List

The following code snippet demonstrates how to create a report link for the TreeList 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.

uses
//...
  ..., dxPScxTL5Lnk;
//...
var
  ATreeListReportLink: TBasedxReportLink;
begin
  // Creates a report link for the TreeList control and adds it to a component printer
  ATreeListReportLink := dxComponentPrinter1.AddLink(TreeListControl);
  // Invokes the print preview window
  dxComponentPrinter1.Preview(True, ATreeListReportLink);
end;

The result is shown in the image below.