The Composite report component allows many reports to be combined into a single document.
This is done by using the components 'AddReports' event, during which the 'Reports.Add' method
is called to add report to the list to be combined.
The code snippet below illustrates how this is done. A composite report component called 'comprep'
is referred to, as are quickrep components on two forms, repfrm1 and repfrm2.
comprep := TQRCompositeReport.Create( mainfrm);
comprep.OnAddReports := mainfrm.CompRepAddReports;
procedure Tmainfrm.SpeedButton1Click(Sender: TObject);
procedure Tmainfrm.CompRepAddReports(Sender: TObject);
comprep.Reports.Add( repfrm1.quickrep1 );
comprep.Reports.Add( repfrm2.quickrep1 );