AlexTZ
Nov 10 2006, 02:33 AM
| CODE |
Converting old FR2.x .frf files to FR4 --------------------------------------
Preserred way to do this is to include frx2xto30.pas unit into your FR4 application's uses list. You can open .frf files in the FR4 designer. After you open a file, save it in the .fr3 format. After you convert all files, REMOVE fr2xto30.pas from uses list.
The biggest compatibility problem is a script. In was totally redesigned in FR3 and FR4 to bring new features such as variable types, classes, functions, common language constructions, significant performance improvement. Unfortunately this means you need to check all your existing script code.
SCRIPT ------
- in FR4 you must declare variables (pascal style), in FR2 it's not supported (basic style).
FR2 code FR4 code a := 1; var a: Integer; a := 1;
- in FR4 you must use <> to surrond report variables, datafields and system variables. In FR2 you must use [] for same purpose and can skip it if variable has a "correct pascal identifier" name.
FR2 code FR4 code a := [dataset."Field"]; a := <dataset."Field">; b := MyReportVariable; b := <MyReportVariable>;
- in FR2 you may use [] even if you don't have to do this. In FR4 using of equivalent <> is restricted to datafields, report variables and system variables only.
FR2 code FR4 code a := [Copy('a', 1, 1)]; a := Copy('a', 1, 1);
- in FR4 you can use pascal-style arrays. FR2 uses tricky arrays without predefined bounds. Use TfrxArray in FR4:
FR2 code FR4 code ar[0] := 1; var ar: TfrxArray; ar[10] := 2; ar := TfrxArray.Create; ar['test'] := 3; ar[0] := 1; ar[i] := 5; ar[10] := 2; ar['test'] := 3; ar[i] := 5;
- FinalPass, FreeSpace, CurY and other engine variables must be changed to Engine.FinalPass, Engine.FreeSpace, Engine.CurY. Partially solved by the converter (it adds "with Engine do" to each code block).
REPORT LAYOUT: --------------
- Text, RichText objects: in FR2 you can use [] to define an expression in the text and inside this expression. In FR4 you must use [] to define an expression and <> inside this expression:
FR2 TfrMemoView text: FR4 TfrxMemoView text: Total: [Sum([table1."Field1"])] Total: [Sum(<table1."Field1">)]
- also check your texts for inconsistent [] use:
FR2 TfrMemoView text: FR4 TfrxMemoView text: [[Copy(s, 1, 1)]] [Copy(s, 1, 1)] [Copy([s], 1, 1)] either [Copy(s, 1, 1)] or [Copy(<s>, 1, 1)] if "s" is reportvariable
- GroupHeader: check Condition property:
FR2 group condition: FR4 group condition: Copy(MyReportVariable, 1, 1) Copy(<MyReportVariable>, 1, 1) [Copy([MyReportVariable], 1, 1)] Copy(<MyReportVariable>, 1, 1)
- redesign cross-tab layout due to significant changes in FR4
DELPHI CODE: ------------
- change "Tfr" prefix to "Tfrx" - change unit names prefix "FR_" to "frx" - change all event handlers because they take new types of parameters - in FR2 you can pass static variables via frVariables global object. In FR4 use frxGlobalVariables to do this.
FR2 code FR4 code frVariables['myname'] := 'name'; frxGlobalVariables['myname'] := 'name';
|
rulonv
Oct 19 2007, 02:59 AM
It appears that you must use the 'Run-time designer' included in the Standard version and above to make these conversions. Is this correct?
If so, is there another way to do the conversions using the Basic edition ... or by using some other utility?
marcobolacha
Jan 14 2009, 01:23 PM
QUOTE(rulonv @ Oct 19 2007, 02:59 AM)

It appears that you must use the 'Run-time designer' included in the Standard version and above to make these conversions. Is this correct?
If so, is there another way to do the conversions using the Basic edition ... or by using some other utility?
quando tento editar o relatorio, da invalid file format.
gpi
Jan 14 2009, 11:54 PM
rulonvuse
CODE
frxReport1.LoadFromFile('1frf');
frxReport1.SaveToFile('1.fr3');
roxyrohit
Jan 26 2010, 07:16 AM
Issue of December 13, pp. 48976–48983, 2002 ... region, is required for the conversion of protofibrils to fibrils. MATERIALS AND METHODS .... distributions of aggregates in fr 2 and fr 4, we measured the ...
dschuch
Jan 28 2010, 08:00 AM
There where some sourcecode issues too (exspecially with <> and [])
eNTi
Feb 2 2010, 07:03 AM
hi. i've never done anything with fr before and now i have to convert a program from fr2.3 (i think it was freereport) to fr4.9. i'm missing some components, maybe you can help me out there:
TfrSpeedButton -> found TSpeedButton?
thefreecat
Jun 12 2010, 05:21 AM
I'm converting an old project (2.xx). Exporting to .FR3 and directly importing to FR4 is completely buggy.
But if you have the chance to still have a FR3 installation somewhere, you can :
- export from 2.xx to FR3 (in FR2)
- open the export.fr3 in FR3
- save it to a new name (like export2.fr3)
- open it in FR4
Many things still don't work, you have to put the fields back to their respective bands, but you don't have to redesign everything.
HTH,
ivan8888
Jul 19 2010, 03:22 AM
Preserred way to do this is to include frx2xto30.pas unit into your FR4
application's uses list. You can open .frf files in the FR4 designer.
After you open a file, save it in the .fr3 format.
I did this, but when I try to open the file in FR4 it says:
The followinf error(s) have occured:
Cannot fing class TfrReportPage
ivan8888
Jul 27 2010, 06:13 AM
I still have a problem with converting FR2 to FR4, is there anyone to help me
ivan8888
Can you upload your frf file to rapidshare.com?
nic nic
Aug 21 2010, 01:16 AM
thank you,,..
It appears that you must use the 'Run-time designer' included in the Standard version and above to make these conversions. Is this correct?
If so, is there another way to do the conversions using the Basic edition ... or by using some other utility?
gpi
Aug 29 2010, 04:16 PM
QUOTE
or by using some other utility?
Yes. Use FR Trial for converting
reenfoo
Sep 7 2010, 06:28 AM
I can't convert FR2 to FR4.
Is there's any other alternative?
thanks
jptss
Sep 16 2010, 08:56 AM
QUOTE(reenfoo @ Sep 7 2010, 01:28 PM)

I can't convert FR2 to FR4.
Is there's any other alternative?
thanks
I did not make any conversion. I have FR2 and FR4 both installed and i just keep the old reports and all the new are made with the v4. After V4 installation, go to Delphi > components > install packages and you will see FastScript duplicated. Delete the old FastScript. Then go to Tools > Options > Library and move the 'C:\Program Files\FastReports\FastReport 4\LibD11' above the first library path you found about the FR2. And its done!
gpi
Sep 27 2010, 01:02 AM
QUOTE
I can't convert FR2 to FR4.
Is there's any other alternative?
Did you try to use fr2xto30.pas for converting?
winli
Oct 27 2010, 01:17 AM
thank you,,..
It appears that you must use the 'Run-time designer' included in
ugg boots shortthe Standard version and above to make these conversions. Is this correct?If so, is there another way to do the conversions using the Basic edition ...
ugg boots tallor by using some other utility?
gpi
Oct 27 2010, 02:01 AM
You may use FR Trial version for report's converting
thefreecat
Jan 22 2012, 06:58 PM
QUOTE(thefreecat @ Jun 12 2010, 05:21 AM)

I'm converting an old project (2.xx). Exporting to .FR3 and directly importing to FR4 is completely buggy.
You can also open the .FR3 file in a text editor and replace all
Memo.text=
with
text=
This will fix the empty memo texts.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.