Migrating from ReportBuilder 19 to FastReport VCL is quick and fun

2020-02-05

logo RB to FR 

Today we will look at migration from ReportBuilder 19 to FastReport VCL.

Let's do it with the updated Converter included in FastReport VCL, it allows you to convert your template, even without ReportBuilder 19 installed on your computer.

Converter (ConverterQR2FR.pas) has the following list of convertible components from ReportBuilder 19 to FastReport VCL, it is presented in the table below.

ReportBuilder

FastReport

Done

ReportBuilder

FastReport

Done

Title

TfrxReportTitle

+

 CheckBox

TfrxCheckBoxView

+

Header

TfrxPageHeader

+

 DBText

TfrxMemoView

+

Detail

TfrxMasterData

+

 DBMemo

TfrxMemoView

+

Footer

TfrxPageFooter

+

 DBRichText

TfrxRichView

+

Summary

-

-

 DBCalc

TfrxMemoView

+

PageSummary

-

-

 DBImage

TfrxPictureView

+

 Memo

TfrxMemoView

+

 DBBarCode

TfrxBarCodeView

+

 RichText

TfrxRichView

+

 2D DBBarCode

TfrxBarcode2DView

+

 Label

TfrxMemoView

+

 DBTeeChart

TfrxChartView

+

 SystemVariable

TfrxMemoView

+

 DBCheckBox

TfrxCheckBoxView

+

 Variable

TfrxMemoView

+

 Region

-

-

 Image

TfrxPictureView

+

 SubReport

-

-

 Shape

TfrxShapeView

+

 CrossTab

TfrxDBCrossView

+

 Line

TfrxLineView

+

 PageBreak

-

-

 TeeChart

TfrxChartView

+

 PaintBox

TfrxPictureView

+

 BarCode

TfrxBarCodeView

+

 TableGrid

TfrxTableObject

+

 2D BarCode

TfrxBarcode2DView

+

 Google Map

TfrxMapView

+

The conversion from ReportBuilder 19 to FastReport VCL.

Select report template of the ReportBuilder 19 designer in *.rtm format.

We will make a simple converter consisting of a form, a pair of components and one button.

Perform the following list of actions:

     1. Create a new application (File -> New -> VCL Forms Application).

     2. Enter in Uses clause ConverterRB2FR.

     3. Depending on the installed components, you may need to remove the following blocks from the Uses clause in ConverterRB2FR.pas:

     VCLTee.TeeProcs, VCLTee.TeEngine, VCLTee.Chart, VCLTee.Series, VCLTee.TeCanvas

     frxChart, frxBDEComponents, frxIBXComponents

     4. Drop the following components to the form:

  • frxReport
  • OpenDialog
  • SaveDialog
  • Button
  • frxDesigner

 screenshot 1

     5. Place this code in the OnClick event of the button:

Code:

1
2
3
4
5
6
7
8
9
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
if frxReport1.LoadFromFile(OpenDialog1.FileName) then
if SaveDialog1.Execute then
frxReport1.SaveToFile(SaveDialog1.FileName);
frxReport1.LoadFromFile(SaveDialog1.FileName);
frxReport1.DesignReport();
end.

     6. Run the application.

 

If you did everything correctly, the application will start, and you will need to click a button on the form.

Then a dialog box for opening a file will appear, open the required report template of the ReportBuilder 19 designer in the format *.rtm.

After this your template will be converted, if this happened successfully, a dialog box for saving the template will appear in front of you, save it in *.fr3 format.

This converted template will automatically be opened in the FastReport VCL designer, but make sure that the conversion is correct.

If a DataSet was attached to your template, you will need to attach it to the FastReport VCL template to display the data correctly when building the report.

 

Example of converting report template of ReportBuilder 19 (*.rtm),

to template report FastReport VCL (*.fr3)

For example, let's build the ReportBuilder template raTutor0001.rtm.

screenshot 2

 

screenshot 3 

Connect ppDBPipeline1 to it through ADOConnection1, DataSource1 and ADOTable1.

 screenshot 4

Follow these steps:

     1. Let's run our simple Converter.

screenshot 5

     2. Press the Test button.

     3. When the open file dialog box appears, open the template ReportBuilder raTutor0001.rtm.

screenshot 6

     4. Then wait for the conversion of your template to be completed, if this was successful, you will see a dialog box to save the template, save it in the format *.fr3, for example raTutor0001.fr3.  

screenshot 7

     5. Then the converted template will automatically be opened in the FastReport VCL designer and make sure the conversion is correct.

screenshot 8

     6. Drop the frxReport1 and frxDBDataset1 components to the form

screenshot 9

     7. In the frxDBDataset1 component, change property DataSource to DataSource1 and UserName to ppDBPipeline1

screenshot 10

     8. Now we need to load the saved template into FastReport VCL Designer. Double-click the FastReport VCL component and open the saved template “raTutor0001.fr3" in the report designer.

screenshot 11

     9. Go to the FastReport VCL Designer Report → Data menu and select the ppDBPipeline1 dataset.

screenshot 12   screenshot 13

     10. We also need to bind this DataSet to the data band. Therefore, double-click the MasterDataBand and select the ppDBPipeline1 dataset.

screenshot 14

     11. Build a report in FastReport VCL.

screenshot 15

 

November 26, 2024

Installing FastReport on .NET 8.0 and Creating a Simple Report

The purpose of this article is to explain step by step how to install FastReport on .NET 8.0 and how to create a simple report. Taking the reporting process from the beginning, it will show how to connect, design and view reports.
November 20, 2024

Localization and Language Switching in FastReport VCL

FastReport VCL supports 40 languages for interface localization and allows you to change the language on the fly through menus or code, without recompilation.
November 01, 2024

New Features of the FastReport VCL Editor

We are considering new features of the report editor: extension lines, highlighting of intersecting objects, updated report and data trees.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.