Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TCustomdxComponentPrinter.AddEmptyLinkEx(TdxReportLinkClass,TComponent) Method

Creates a new report link and adds it to the collection.

#Declaration

Delphi
function AddEmptyLinkEx(ALinkClass: TdxReportLinkClass; AOwner: TComponent): TBasedxReportLink;

#Parameters

Name Type Description
ALinkClass TdxReportLinkClass

The reference to the required report link class.

AOwner TComponent

The owner component for the created report link.

The owner component automatically destroys the associated report link when the application destroys the component. You can call the DeleteLink procedure to destroy the created report link manually.

#Returns

Type Description
TBasedxReportLink

Returns the created report link.

Cast the returned object to the corresponding terminal report link class to access all public API members. The ALinkClass parameter specifies the actual report link type.

#Remarks

Call the AddEmptyLinkEx function to create a new empty (non-configured) report link of any required type.

The created report link is not associated with a source control. You need to use the link’s Component property to specify the content source control.

Tip

AddLink and AddLinkEx functions automatically associate the created report link with the specified parent 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;  // This unit 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;
See Also