We help IT Professionals succeed at work.

3 reports to one

olisaac
olisaac asked
on
Hi,

I'm using QReport to makes some different printing
For the moment my application print 3 differents reports (3 documents in fact)

Now i've a recto-verso printer.

I would know how to regroup this 3 reports in one to take benefit of the recto-verso of the printer
Comment
Watch Question

Commented:
Try to use TQRCompositeReport.

Best Regards
Ivan

Author

Commented:
Can you give me one sample to use this component ?
Commented:
I use this

procedure TfrmReports.QRCompositeReportAddReports(Sender: TObject);
begin
  QRCompositeReport.Reports.Clear;
  QRCompositeReport.Reports.Add(qrStDanFakQR);
  QRCompositeReport.Reports.Add(qrStOprFakQR);
  QRCompositeReport.Reports.Add(qrStExpFakQR);
  QRCompositeReport.Reports.Add(qrStPrDanQR);
  QRCompositeReport.Reports.Add(qrStPrOprQR);
  QRCompositeReport.Reports.Add(qrStPPPQR);
  QRCompositeReport.Reports.Add(qrStKrIzvQR);
end;

Best Regards
Ivan

Author

Commented:
It's ok with your procedure to add reports.

I've add one function to print but it doesn't work ?
My instruction is not correct ?

procedure TfrmReports.QRCompositeReportAddReports(Sender: TObject);
begin
 QRCompositeReport.Reports.Clear;
 QRCompositeReport.Reports.Add(qrStDanFakQR);
 QRCompositeReport.Reports.Add(qrStOprFakQR);
 QRCompositeReport.Reports.Add(qrStExpFakQR);
 QRCompositeReport.Reports.Add(qrStPrDanQR);
 QRCompositeReport.Reports.Add(qrStPrOprQR);
 QRCompositeReport.Reports.Add(qrStPPPQR);
 QRCompositeReport.Reports.Add(qrStKrIzvQR);

 QRCompositeReport.Print;

end;

Author

Commented:
It's ok with your procedure to add reports.

I've add one function to print but it doesn't work ?
My instruction is not correct ?

procedure TfrmReports.QRCompositeReportAddReports(Sender: TObject);
begin
 QRCompositeReport.Reports.Clear;
 QRCompositeReport.Reports.Add(qrStDanFakQR);
 QRCompositeReport.Reports.Add(qrStOprFakQR);
 QRCompositeReport.Reports.Add(qrStExpFakQR);
 QRCompositeReport.Reports.Add(qrStPrDanQR);
 QRCompositeReport.Reports.Add(qrStPrOprQR);
 QRCompositeReport.Reports.Add(qrStPPPQR);
 QRCompositeReport.Reports.Add(qrStKrIzvQR);

 QRCompositeReport.Print;

end;

Commented:
OnAddReports is a Event of QRCompositeReport, it means when you set QRCompositeReport before preview or printing it takes the described reports. You must call QRCompositeReport.Print from other place.
There is a good example of QRCompositeReport in QR example in Delphi.

Regaards
Ivan

Author

Commented:
ok thank you
Sorry for my late answer...