Storing reports in database

edited 5:07AM in FastReport 3.0
Hi all,

I need to store report templates in database, but how can I "override" saving routine in FR 3.15 ???

Milan Tomes

Comments

  • edited 5:07AM
    I Have a report designer in my application.

    In the TfrxDesigner.OnSaveReport event I use this code:

    function TfrmReportDesigner.frxDesignerSaveReport(Report: TfrxReport;
    SaveAs: Boolean): Boolean;
    var
    memStream: TMemoryStream;
    begin
    memStream := TMemoryStream.Create;
    frxReport.SaveToStream(memStream);
    rdmo.dsetRelatorio.Edit;
    TBlobField(rdmo.dsetRelatorioReportFile).LoadFromStream(memStream);
    rdmo.dsetRelatorio.Post;
    memStream.Free;
    end;

    Using a TMemoryStream, I place the Report in the stream, then load the stream in the db Blob Field.

    Works fine.

  • edited 5:07AM
    Hi ...

    Sorry by the deceit.

    The code posted above works fine for reports ... no for templates ...

    Sorry
  • edited 5:07AM
    It works fine even for templates in run-time.

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.