Export to PDF from a stream

edited October 2016 in FastReport 4.0
Hello,

I need to generate a pdf file I get a blank PDF file when I set to False the frxPDFExport1.ShowDialog because I must to do it in background without displaying the DialogBox. Setting that property to True it works. Can you please help for a solution ?

  Stream := TMemoryStream.Create;
  QrySpoolerSTORED_REPORT.SaveToStream(Stream);
  Stream.Position:=0;
  Except
  end;
  frxPDFExport1.ShowDialog:=True;
  frxReport1.PreviewPages.LoadFromStream(Stream);
  frxReport1.PrepareReport(false);

  frxPDFExport1.DefaultPath := 'e:\MyFolder\';
  frxPDFExport1.FileName := 'e:\MyFolder\test.pdf';
  frxReport1.Export(frxPDFExport1);

Thanks

NB: Sorry the subject is wrong it must be "Blank PDF file when exporting" I did not find how to modify it.

Comments

  • edited October 2016
    I mean I get an empty PDF
    Sorry for my english
  • gpigpi
    edited 7:05PM
    Try to comment
    //frxReport1.PrepareReport(false);
    

Leave a Comment