Multiple reports into One PDF
Hi, I'm trying to locate this example but get 404 on the page. Is there a new link ?
The example shows how you can merge multiple reports into a single PDF file.
You would essentially be doing the same thing only with the same report over
and over again until you reach the proper number of copies.
http://www.digital-metaphors.com/rbWiki/Output/PDF/How_To...Merge_Multiple_Reports_into_one_PDF
The example shows how you can merge multiple reports into a single PDF file.
You would essentially be doing the same thing only with the same report over
and over again until you reach the proper number of copies.
http://www.digital-metaphors.com/rbWiki/Output/PDF/How_To...Merge_Multiple_Reports_into_one_PDF
Comments
ppReport1.Template.DatabaseSettings.Name := cbTemplate.Text ;
ppReport1.Template.LoadFromDatabase ;
ppReport1.DeviceType := 'PDF';
ppReport1.AllowPrintToFile := True;
lPDFDevice := TppPDFDevice.Create(nil);
lPDFDevice.PDFSettings := ppReport1.PDFSettings; // optionally assign PDFSettings from report
lPDFDevice.PDFSettings.OpenPDFFile := False;
lPDFDevice.FileName := TppFileUtils.GetApplicationFilePath + 'myReport.PDF';
lPDFDevice.Reset;
while not QryInvItemsSum.Eof do
begin
lPDFDevice.EndPrintJob := False;
lPDFDevice.Publisher := ppReport1.Publisher;
ppReport1.ShowPrintDialog := False ;
ppReport1.PrintToDevices;
lPDFDevice.StartPrintJob := False;
dmData.QryInvItemsSum.Next ;
end;
lPDFDevice.EndPrintJob := True;
lPDFDevice.Free;
DecimalSeparator := '.';
ThousandSeparator := ',';
ppFormatSettings.DecimalSeparator := DecimalSeparator;
ppFormatSettings.ThousandSeparator := ThousandSeparator;
Andy
All of our articles can be found at the following location: https://rbwiki.digital-metaphors.com/
The article you are looking for is at the following link:
https://rbwiki.digital-metaphors.com/output/pdf/how-to-merge-multiple-reports-into-one-pdf/
I suggest downloading the example provided and looking at how it works. Pay particular close attention to the order in which the StartPrintJob and EndPrintJob properties are set and the PrintToDevices routine is called.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Starting with RB 21, you can use the PDFComponent to add existing PDF files to a report. The PDFComponent can be found on the "Advanced Components" toolbar in the designer. See the following article and help topics for more information.
https://rbwiki.digital-metaphors.com/rcl/pdfcomponent/fundamentals/
Note: The PDFComponent behaves like a Section Subreport. If you would like to add PDF files to the end of your existing report, I recommend creating a new "container" report with a detail band only. Inside the detail is a section subreport containing your original report, then add PDF components as needed below.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com