Composite report
We currently work with composite reports using something like:
MainReport := TrelReciboCartao.Create(Application); TrelReciboCartao(MainReport).CodCartaoEntrega := aCodCartaoEntrega; if Reports.Count > 0 then begin MainReport.PreparaRelatorio; for i := 1 to Reports.Count - 1 do begin Reports[i].PreparaRelatorio; MainReport.Relatorio.PreviewPages.AddFrom(Reports[i].Relatorio); end; MainReport.Relatorio.ShowPreparedReport; end;
Where all the reports are defined in Forms, with a TfrxReport in it called Relatorio. So, Reports is a list of these forms that will be aggregated to the main report. This works fine, but breaks the page before adding the next report. This makes no difference for digital documents, but it can represent a waste of paper for the printed ones. So we want to generate these composite reports using all available page space, that is, start printing the next report at the point where the predecessor ended. We have already marked the EndlessWidth property of the frxReportPage for all the reports involved, and the PrintOnPreviousPage property of the frxReportPage for all the secondary reports but it didn't work as expected.
Does anyone know how to do that?
Comments
Use one instance of TfrxReport and use TfrxReport.PrepareReport(False). PrintOnPreviousPage will works in this case