Save report in DB

edited 3:26PM in FastReport 3.0
Hi. Is it possible to save a report in database using fast report 3.0??s object properties or must i do it manually?

thanks

Comments

  • PJCFPJCF Jersey, Channel Islands, UK
    edited 3:26PM
    Have a look at the SaveToFile procedure and the LoadFromFile function - I think this is what you might need - I haven't used these myself but believe it is what you are looking for.

    Hope it helps - Peter
  • ShivanShivan Germany
    edited 3:26PM
    You can easily save Reports in a blob by using streams.

    react on the event "OnSaveReport"

    Validate the data (SaveAs)
    and use Report.SaveToStream to save it to a memory stream. This can then be loaded into your blob by casting:

    <span style='font-family:Courier'>myStream: TMemoryStream;

    Report.SaveToStream(myStream);
    myDataset.(FieldByName('ReportData') as TBlobField).LoadFromStream(myStream);</span>

    Loading see reverse ;)

    <span style='font-family:Courier'>myDataSet.(FieldByName('ReportData) as TBlobField).SaveToStream(myStream);
    Report.LoadFromStream(myStream);</span>

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.