Skip to main content
A newer version of this page is available. .

PrintableComponentContainer Class

A container for DevExpress and third-party Windows Forms controls, as well as controls implementing the IPrintable interface and documents created using printing links.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

public class PrintableComponentContainer :
    WinControlContainer

Remarks

To print a control or a printing link, assign it to the PrintableComponentContainer.PrintableComponent property in code:

using System.Windows.Forms;

// Create a new report instance. 
XtraReport1 report = new XtraReport1();

// Link the required control (for instance, the Grid Control) with the PrintableComponentContainer of a report. 
report.printableComponentContainer1.PrintableComponent = gridControl;

// Invoke a Print Preview for the created report document.  
ReportPrintTool preview = new ReportPrintTool(report);
preview.ShowRibbonPreview();

See Using Third-Party Controls to learn about using the PrintableComponentContainer for embedding DevExpress controls to a report.

Implements

DevExpress.XtraPrinting.IBrickOwner
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable

Inheritance

See Also