How To…Manually Link DADE Pipelines

Question

“How can I link DADE pipelines manually? Sometimes I need to manually edit the SQL or need to bypass generation of the magic sql

Solution

For the linked data traversal to work properly, make sure the detail query selects all records required for the entire report and Order By the linking field(s).

The following examples uses the Report.BeforeOpenDataPipelines event to define a master/detail link.

Download: LinkDADEPipelines.zip

Delphi code sample:

uses
  ppDB;

procedure TForm1.ppReport1BeforeOpenDataPipelines(Sender: TObject);
var
  lMasterPipeline: TppDatapipeline;
  lDetailPipeline: TppDatapipeline;
begin

  lMasterPipeline := ppReport1.DataPipeline;
  lDetailPipeline := ppSubreport1.DataPipeline;

  lDetailPipeline.AddLink(lMasterPipeline, 'CustNo', 'CustNo');

end;