prepared report to and from stream?

Is there any way to work with the prepared report as a stream without saving to a file and reloading?

I need to be able to base64 the prepared report and save/retreive it from a database for export into different formats.

klint.

Comments

  • edited 12:25PM
    Hi Klint!

    If You mean You wanna save the prepared pages as graphic stream You can do that by calling the TFRReport.EMFPages.SaveToStream(aStream:TStream) method.

    Regards:Alex
  • edited February 2004
    [previous message edited]

    ok, got that going. have to remember to rewind the stream after filling it.

    ms := tmemorystream.create;
    frReport1.loadfromfile('areport.frf');
    frReport1.PrepareReport;
    frReport1.EMFPages.savetostream(ms);
    ms.seek(0,soFromBeginning);
    frReport2.EMFPages.loadfromstream(ms);
    frReport2.ShowPreparedReport;

    klint.

Leave a Comment