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 3:57AM
    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 3:57AM
    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 3:57AM
    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 3:57AM
    Can Fastreport add this functionality in the near future?
    believe it is not too difficult to integrate this?

    thanks.

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.