Back to Devexpress

TBasedxReportLink.Component Property

vcl-dxpscore-dot-tbasedxreportlink-05203246.md

latest2.1 KB
Original Source

TBasedxReportLink.Component Property

Specifies the target source control.

Declaration

delphi
property Component: TComponent read; write;

Property Value

TypeDescription
TComponent

The content source control.

|

Remarks

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:

delphi
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;
cpp
#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

TBasedxReportLink Class

TBasedxReportLink Members

dxPSCore Unit