質問

Can you combine a portrait report and a landscape report using Quick Reports Pro?

Quick Report Help File Snippet:

The way to handle this situation is to use a TQRCompositeReport component. Drop one on the form where you want to kick off the printing. First you need to define a handler for its OnAddReports event, which calls the TQRCompositeReport.Add method to add all the TQuickRep components you need to print. Suppose the reports you want to print are held on forms called RepNewCust, RepOrderSummary and RepStockReorder, and in each case the TQuickRep component on the form is called 'Report' (see the section 'TQuickRep in detail' below for why you might do this). Then your OnAddReports event handler should look like this


procedure TForm1.QRCompositeReport1AddReports(Sender: TObject);
begin
  QRCompositeReport1.Reports.Add(RepNewCust.Report);
  QRCompositeReport1.Reports.Add(RepOrderSummary.Report);
  QRCompositeReport1.Reports.Add(RepStockReorder.Report);
end;

Now you can call QRCompositeReport1.Print to print out all three reports in a single batch, and QRCompositeReport1.Preview to preview them together. There are also TQRCompositeReport component properties that let you set up paper sizes and set an overall title for the composite report - basically everything you need to handle the output from the multiple reports in one place.

I'd like mix between Portrait and Landscape as follows:

RepNewCust.Report (Portrait)
RepOrderSummary.Report (Portrait)
RepStockReorder.Report (Landscape)

Can this be done?

役に立ちましたか?

解決

It can not be done. I received the following reply from the developer:

Hi,

It can't be done with the present code. I'm not sure why but mixing report orientations just doesn't work.

Regards,
QBS Software Ltd

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top