vcl-dxpscore-dot-tbasedxreportlink-05203246.md
Specifies the target source control.
property Component: TComponent read; write;
| Type | Description |
|---|---|
| TComponent |
The content source control.
|
Use the Component property to associate the report link with a compatible control.
The following code example creates a report link for an existing PDF Viewer control, prints its content without user interaction, and deletes the created report link:
uses
dxPSdxPDFViewerLnk; // Declares the TdxPDFViewerReportLink class
// ...
var
AReportLink: TBasedxReportLink;
begin
// Creates a PDF Viewer control report link
AReportLink := dxComponentPrinter1.AddEmptyLinkEx(TdxPDFViewerReportLink, dxPDFViewer1);
AReportLink.Component := dxPDFViewer1; // Associates the created report link with the source control
try
AReportLink.Print(False); // Prints chart content without user interaction
finally
dxComponentPrinter1.DeleteLink(AReportLink.Index); // Deletes the report link after export
end;
end;
#include "dxPSdxPDFViewerLnk.hpp" // Declares the TdxPDFViewerReportLink class
// ...
TBasedxReportLink *AReportLink;
// Creates a PDF Viewer control report link
AReportLink = dxComponentPrinter1->AddEmptyLinkEx(__classid(TdxPDFViewerReportLink), dxPDFViewer1);
AReportLink->Component = dxPDFViewer1; // Associates the created report link with the source control
try
{
AReportLink->Print(false); // Prints chart content without user interaction
}
__finally
{
dxComponentPrinter1->DeleteLink(AReportLink->Index); // Deletes the report link after export
}
See Also