Calling fr3 to frx conversion from .net

Is there any way how to call fr3 to frx conversion from a .net application? I found only a fr3toFrx.exe tool (seems like Delphi/win32 exe).
Thanx Jon

Comments

  • edited 2:33AM
    Hello,

    The conversion logic is written in Delphi, so it can't be called directly from .net. However, you can run the .exe file from .net application.
  • edited 2:33AM
    Hello,
    Does exists fr3tofrx as win32 dll? Is there any way how to manage fr3tofrx.exe conversion from command line?
    (Our task is to load fr3 file from database, convert it to frx and save it back to database. We would like to include this conversion to an our application. May be Delphi win32 app)
    Thanx
    AlexTZ wrote: »
    Hello,

    The conversion logic is written in Delphi, so it can't be called directly from .net. However, you can run the .exe file from .net application.
  • edited 2:33AM
    Hello,

    Sorry, the converter does not support command line or batch convertion, because every .frx report should be corrected manually.
  • pinbotpinbot Texas
    edited 2:33AM

    The converter is excellant.

    I've converted a report that had several hundred text objects and it worked great.

    Alex is correct, though. There is always some needed manual changes.

    The biggest change that I've found is that the Data Tab objects (from FR Studio) have to be completely recreated.

    Totals are completely different too.


  • edited 2:33AM
    Hello,
    There are source codes for some Fastreport's applications. Does possible to get fr3tofrx.exe/delphi source codes? Are fr3tofrx.exe codes included in any fasterport application?
  • edited October 2009
    Hello,

    The converter's source code is included in FastReport VCL. The fr3tofrx tool just calls the converter:
    uses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, frxClass, frxSaveFRX;
    
    type
      TForm1 = class(TForm)
        Button1: TButton;
        OpenDialog1: TOpenDialog;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    {$R *.DFM}
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      r: TfrxReport;
      s: TfrxSaveFRX;
      i: Integer;
    begin
      if OpenDialog1.Execute then
      begin
        for i := 0 to OpenDialog1.Files.Count - 1 do
        begin
          r := TfrxReport.Create(nil);
          r.LoadFromFile(OpenDialog1.Files[i]);
          s := TfrxSaveFRX.Create;
          s.Save(r, ChangeFileExt(OpenDialog1.Files[i], '.frx'));
          s.Free;
          r.Free;
        end;
    
        ShowMessage(IntToStr(OpenDialog1.Files.Count) + ' file(s) converted.');
      end;
    end;
    
  • edited 2:33AM
    Hello,
    which version of FastReport vcl I need to get full fr3toFrx? I tryed open fr3 file and save it as frx (in designer of demonstration vers. FastReport 4 for Delphi 7 ). I get diferrent result to Fr3ToFrx.exe conversion. The result (from demonstration vers. Fr4) is usable but some parts of report lost.
    Thanx
  • edited 2:33AM
    frxSaveFRX unit has a limitation - your report must be connected to data. In this case it will be converted correctly. It is possible, if you run the conversion from your Delphi project where you have all reports and a data for them. The fr3tofrx.exe utility does not have such requirement because it was built using custom FR VCL build. So - sorry again.
  • edited 2:33AM
    Hello,
    we underestand that there is not a direct way, but there are provided full sources with some versions of Fast report 4. I dont know if there is any way, but does possible to estimate how dificult would be to modify conversion unit frxSaveFRX (from full sources) to allow make convesion without a connection to data? It seems that there is no problem to put frxSaveFRX sources to delphi dll and call this dll from .net by P-invoke. We have an old delphi application which use FastReport 3. We would like leave it and call conversion from .net.
    Thanx
  • edited 2:33AM
    Hello,

    I've updated the fr3tofrx utility; now you can specify the file to convert in the command line:
    fr3tofrx.exe c:\1.fr3
    (would produce c:\1.frx file).
  • edited 2:33AM
    Thanks, that's great! We really appreciate your response!

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.