How to create one single report out of several in Delphi / Lazarus / C++ Builder

2020-12-11

I would like to note that FastReport VCL is one of the most convenient components for generating reports of any complexity. After all, here we can use not only different types of DBMS, but also Swiss barcodes, maps, tables, graphs and many other objects. Quite often we are asked “how to create one single report out of several?”. Well, easy! Look!

For this purpose, FastReport has a function that helps to create a new report in addition to the previously generated one. The TfrxReport.PrepareReport method has one optional ClearLastReport:Boolean parameter, which by default is True. This parameter determines whether the pages of the previously built report should be cleared. There is one small detail. When creating the first report, you use a DataSet from one database, when creating the second report – from another.

An example of building a combined report:

Pascal:
frxReport1.LoadFromFile('1.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('2.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;

 

C++:
frxReport1->LoadFromFile("1.fr3");
frxReport1->PrepareReport(true);
frxReport1->LoadFromFile("2.fr3");
frxReport1->PrepareReport(false);
frxReport1->ShowPreparedReport();

Load the first report and build it without showing it on the screen. Then load the second one into the same TfrxReport object and build it with the ClearLastReport = False parameter. This adds the report to the previously generated one.

The second-to-last two lines can be repeated to add more and more reports. This option is only available from code.

After you have finished working with the databases, you can see the resulting file in the preview window. You can also immediately save it to any destination in any desired format – PDF, SVG, Text file, etc. without any difficulties.

VCL VCL Lazarus Lazarus FastReport FastReport Data Source Data Source Delphi Delphi
8 Eylül 2026, Salı

FP3 Formatı ile ilgili Sıkça Sorulan Soruların Cevapları

FP3 formatıyla ilgili 11 yaygın soruyu inceleyeceğiz: bu dosyaların ne olduğu, FR3 dosyalarından nasıl farklı oldukları, hangi programların bunları açabileceği ve PDF'ye nasıl dönüştürüleceği.
4 Eylül 2026, Cuma

FastReport .NET'ten bir raporu DXF formatına nasıl aktarabilirim?

Bu makalede, bir raporu DXF formatına aktarma yöntemlerini inceleyeceğiz ve ayrıca dosya bir CAD uygulamasında açıldıktan sonra elde edilen çıktının nasıl göründüğünü göreceğiz.
3 Ağustos 2026, Pazartesi

FastReport .NET'ten bir raporu PostScript formatına nasıl aktarabilirim?

Bu makalede, pratik bir örnek kullanarak parametre yapılandırmasını ve programatik uygulamayı inceleyerek, bir FastReport .NET raporunun PostScript formatına nasıl aktarılacağını ele alacağız.

© 1998-2026 Fast Reports Inc.