PrintableComponentContainer.PrintableComponent Property
Used to assign a Windows Forms control or a printing link to a PrintableComponentContainer at runtime.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v19.1.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core
Declaration
Property Value
Type | Default | Description |
---|---|---|
Object | *null* | A Object value. |
Remarks
The PrintableComponentContainer allows you to use various third-party visual elements in a report.
To print a control or a printing link, assign it to the PrintableComponentContainer.PrintableComponent
property at runtime:
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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PrintableComponent property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.