As you know, Embarcadero RAD Studio XE2 is coming with the special edition of FR4. Many people have been asking us: is it possible to convert Rave reports (.rav files) to Fast reports (.fr3 files)? It is possible, because we have developed a convertor from Rave reports for this purpose.
How to convert a .rav file
From a user’s point of view, to convert a .rav file no special actions needed: just click File > Open in the main menu of the designer and then choose a .rav file. If you are a developer and want to know how to enable the ability to import .rav files, then consider this code:
program RaveImport; uses frxClass, frxDesgn, ConverterRR2FR; begin TfrxReport.Create(nil).DesignReport; end.
Once this program is launched, the report designer appears and its File > Open dialog will offer to open .rav files as well as .fr3 files. Note, that in order to compile this program, you need to have Rave installed, or just have its .pas or .dcu files available to the compiler.
What Rave reports can be imported
The convertor supports the most of components that can appear in a Rave report, including database connections. Those Rave components that have no direct representation in FastReports, are converted to components with the closest behaviour. Here is an example of a complex Rave report converted to an .fr3 file:
The process of importing
When you click the File > Open menu item and choose a .rav file, the convertor at first checks how many reports are inside the file. If there are several reports inside the file – Rave allows to have multiple reports in a single file – then each report will be converted to a fr3 file and the convertor will ask to choose a folder where all these .fr3 files can be saved:
After that the convertor will start processing each report and during this stage, which can be quite long for big .rav files with numerous reports inside, the following progress bar will be shown:
When all reports converted, the last created .fr3 file is shown in the designer:
Some old versions of Rave have certain issues with loading numerous big SQL queries, which may result in memory corruption and undefined behaviour of the convertor. To avoid such problems, the convertor provides the property LoadQueries which can be disabled in order to skip loading SQL queries. However, if the convertor is compiled with newer Rave sources, no problems should occur.