Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

Saving reports to database

edited July 2007 in Devices
Hi All,

I'd like to save the reports to database. What is the best way of doing
this?

Thanks in advance
Muzaffer

Comments

  • edited July 2007
    I know ArchiveReader can read a report from database, but how can I write it
    to database?


  • edited July 2007
    ---------------------------------------------------
    Tech Tip: Loading an Archive File to a Blob
    (or memory stream)
    ---------------------------------------------------

    You can easily write a routine to take a .RAF file and
    load it into a blob field or a TMemoryStream:

    myFileStream := TFileStream.Create('myArhcive.RAF', fmOpenRead);

    myFileStream.Position := 0;
    myBlobField.LoadFromStream(myFileStream);

    myFileStream.Free;


    OR

    myMemoryStream := TMemoryStream.Create;

    {note: passing 0 as the second parameter will copy the entire stream}
    myMemoryStream.CopyFrom(myFileStream, 0);

    myMemoryStream.Free;


    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.