Transform many reports

Hello again,

I'm trying transform fr2 to fr3 like:

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto--> frReport1.LoadFromBlobField(Blob);
frReport1.SaveToFR3File('report.fr3');
frxReport1.LoadFromFile('report.fr3');<!--fontc--></span><!--/fontc-->

and work with problems but

a.) when execute frxReport1.PrepareReport() it's raice a error "Dataset "" is not exist"
b.) if I edit the report in design mode and click on "preview button" shows the following error "source file not found: fs_iilparser.pas"
c.) if I try to edit the dataset property band shows the error "source file not found: frxDesgnEditors.pas".
d.) ...

I'm sure the path of the library is correct and points C:\Archivos de programa\FastReports\FastReport 3\LibD6

Please any clue will be very good received.

TIA
S.Barco



Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:54AM
    1. see my answer to your other post.
    IMHO i would update to latest version of fr4 daily build.
    load your fr2x reports from the blob and save them in a dir as fr2 files not as fr3.
    in your ap that you are converting make sure you have the designer in your uses clause and the fr2xto30 unit also add frxdbdatasets where required.Note if your 2x report had fieldnames like table1.fieldname make sure you give the frxdbdataset a username of table1.
    set the frxdesigner fileopendir to this dir
    open the fr2 file from the fr3/4 designer then save as fr3 file.
    start with simple reports first, IMHO in some cases complicated reports are quicker to just redesign.
    if any of your 2x reports rely on delphi code in events of the report component ie obp,ogv etc,
    this code must be rewritten to suit fr3/4 report component.
    you might find that creating a separate conversion app with dup datamodule is easier.
  • edited 1:54AM
    Many thanks for the quick response Mr. Gork

    I followed all their steps and everything will be perfect, except for one problem that I can not solve, I explain:

    1. Desinstall fr3.0
    2. Install fr3.24 (last version 3.xx) (many thank to Mr. Fediachov)
    3. Import report as you said (frReport1.savetofile, frxReport1.Loadfromfile)
    4. i create a new tfrxdbdataset that points to dataset datamodule.clients, username clients
    4. edit the report
    5. go to menu report/data and check clients
    6. go to masterdata band and put clients in Dataset property
    7. click preview button and the report show perfect without any problems

    but if a insert a function on the event onbeforeprint it show "source file not found: fs_iilparser.pas"

    procedure band2Onbeforeprint(sender: tfrxcomponent);
    begin
    myfunction(1);
    end;

    - I'm sure that delphi library points to ....\fastreport 3\libd6
    - I'm create and assign a onuserfunction in frxReport (similar like fr2.x), but tracing, the error indicated above, occurs before entering this event.

    Am I doing something wrong with the version fr3 ?

    TIA
    S.Barco

  • edited 1:54AM
    Solved!!!

    a) as you said on 29/Sept ... seems like you are running in debug mode and the frlib was not compiled with debug info...

    [img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> I forgot to include the function tfrxReport.Addfunction before designreport, or before preparereport or before other function that need to run the report. It should be read more manual friends! Thanks Gordk Thanks TeamFR[/img]
  • gordkgordk St.Catherines On. Canada.
    edited 1:54AM
    you found the problemif the function is not added it trigers the call to the report components's on user function event .
    BTW if you want to have functions available to all reports within the ide better to create a function lib.
    see developers manual.
  • edited 1:54AM
    ok, thanks again Mr. Gordk

    S.Barco

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.