Save report in DB

edited 11:45PM 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 11:45PM
    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 11:45PM
    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