How to save a report FR4 into a firebird blob field?

jspjsp
edited 1:28PM in FastReport 4.0
How to save a report FR4 into a firebird blob field?

At Fr2.5 was a function 'savetoblobfield' a it was very easy to save the report in a blob field in the firebird database.
At Fr4 I have not found a function to do this . Can anyone tell me how to implement a 'savetoblod' in Fr4 because I cannot upgrade my reports from 2,5 to 4 since I cannot save them in blob

Thanks

Comments

  • edited 1:28PM
    wrote:
    How to save a report FR4 into a firebird blob field?

    At Fr2.5 was a function 'savetoblobfield' a it was very easy to save the report in a blob field in the firebird database.
    At Fr4 I have not found a function to do this .
    At Fr4 you can use function SaveToStream.
  • jspjsp
    edited 1:28PM
    OlegK wrote: »
    OlegK wrote: »
    How to save a report FR4 into a firebird blob field?

    At Fr2.5 was a function 'savetoblobfield' a it was very easy to save the report in a blob field in the firebird database.
    At Fr4 I have not found a function to do this .
    At Fr4 you can use function SaveToStream.

    Is available a code examble for Delphi ??
  • gordkgordk St.Catherines On. Canada.
    edited 1:28PM
    look in the binaries news group
  • edited 1:28PM
    did u solve your problem?
  • jsp wrote: »
    How to save a report FR4 into a firebird blob field?

    At Fr2.5 was a function 'savetoblobfield' a it was very easy to save the report in a blob field in the firebird database.
    At Fr4 I have not found a function to do this . Can anyone tell me how to implement a 'savetoblod' in Fr4 because I cannot upgrade my reports from 2,5 to 4 since I cannot save them in blob

    Thanks

    To save:
    var 
      f: TFileStream;
    begin
      f := TFileStream.Create(fileName, fmOpenRead);
      ...
      ParamByName('YOUR_BLOB_FIELD').LoadFromStream(f);
      ExecSQL;
      ...
      f.Free;
    end;
    

    To load:
    var 
      report_blob: TBlobField;
      report_stream: TStream;
    begin
      //After querying
      ...
      //In case you use TClientDataSet
      report_blob := yourClientDataSet.FieldByName('YOUR_BLOB_FIELD') as TBlobField;
    
      report_stream := TStream.Create;
      report_stream := yourClientDataSet.CreateBlobStream(report_blob, bmRead);
      
      frxReport.LoadFromStream(report_stream);
      ...  
    end;
    

    It works fine for me.

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.