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.v18.2.dll

Declaration

[XRToolboxSubcategory(1, 4)]
public class PrintableComponentContainer :
    WinControlContainer,
    IXRSerializable,
    IEnumerable,
    IBrickOwner,
    IScriptable,
    IXtraSupportDeserializeCollectionItem,
    IXtraSerializable
<XRToolboxSubcategory(1, 4)>
Public Class PrintableComponentContainer
    Inherits WinControlContainer
    Implements IXRSerializable,
               IEnumerable,
               IBrickOwner,
               IScriptable,
               IXtraSupportDeserializeCollectionItem,
               IXtraSerializable

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.

Inheritance

Object
XRControl
WinControlContainer
PrintableComponentContainer

Implements

DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable

See Also