Exporting PDF as memorystream

In your FAQ, you have this sample:

frxReport1.PrepareReport;
s := TMemoryStream.Create;
frxReport2.SaveToStream(s);
s.Position := 0;
frxReport1.LoadFromStream(s);
frxReport1.PrepareReport;
frxReport1.ShowPreparedReport;

The above report only works for saving the FR3 report
to a stream.

How can I output a PDF as a memory stream instead
of saving it to a Filename?

Can the Basic and Standard version do this?

thanks,
John

Comments

  • edited 6:01AM
    johnbt wrote:
    How can I output a PDF as a memory stream instead
    of saving it to a Filename?

    PDF is PDF. If you need to save as mem stream just use frxReport.SaveToStream and dont' save it as PDF, didn't you?
  • edited 6:01AM
    As I said in the original post, the "SaveToStream" only saves the .FR3 report,
    but I want the .PDF to be in the stream...

    please advise.

    thanks.
  • edited 6:01AM
    the easiest way I think is:
    - prepare the report and save as PDF with unique file name
    - load the PDF file created by FR as stream
    - save the stream.
    hope this help.
  • edited 6:01AM
    Can Fastreport add this functionality in the near future?
    believe it is not too difficult to integrate this?

    thanks.

Leave a Comment