Convert QR to FR


Hi !!

in previous versions of Fastreport i have this code for convert the Quickreport form to Fr format.
procedure TFconfigInformes.sbexportarqrClick(Sender: TObject);
var
  conv: TConverterQr2FrNew;
  savedialog1: Tsavedialog;
  qreport: TQUICKREP;
  cnombre: string;
begin

    try
    Application.createform( tfqrefectose,fqrefectose )
    conv := TConverterQr2Fr.Create;
    
    conv.Source := TFQREfectosE; 
    conv.Target := FRXMUESTRA;
    conv.Convert;

    savedialog1 := Tsavedialog.Create(self);
    SaveDialog1.InitialDir:= extractfiledir(Application.ExeName);
    SaveDialog1.FileName  := TFQREfectosE.name; 
    if SaveDialog1.Execute then
        FRxmuestra.SaveToFile( savedialog1.filename );
    

    finally
    savedialog1.Free;
    end;

end;

In FR6 , the unit ConverterQR2FR does not have the property source/target,, and i dont have the .qrp file...
its possible ???

Comments

  • gpigpi Volnovakha, Ukraine
    edited 11:49AM
    1. Create a new program (File -> New -> VCL Forms Application).

    2. Project -> Add -> Browse and find ConverterQR2FR.pas.

    3. Depending on the components you have installed, you might have to remove the following units from the uses list in ConverterQR2FR:

    VCLTee.TeeProcs, VCLTee.TeEngine, VCLTee.Chart, VCLTee.Series, VCLTee.TeCanvas
    frxChart, frxBDEComponents, frxIBXComponents

    Removing them should be safe, since your report doesn't use TeeChart.

    4. Add the following to the form:
    frxReport
    OpenDialog
    SaveDialog
    Button

    5. Put this in the Button OnClick event:
      if OpenDialog1.Execute then
      begin
        if frxReport1.LoadFromFile(OpenDialog1.FileName) then
        begin
          if SaveDialog1.Execute then
          begin
            frxReport1.SaveToFile(SaveDialog1.FileName);
          end;
        end;
      end;
    
    6. Run the program, click the button.
  • edited August 17

    What is this supposed to be opening? QuickReports are hosting within a Delphi form, but when I try to point it to the .pas, or .dfm file it says it's an invalid format.


    Also, this isn't compatible with Delphi 7 because of the options used for the conversion and the units that are used.

  • gpigpi Volnovakha, Ukraine

    Use text DFM, not binary DFM

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.