In export to PDF does not start event OnBeforePrint

edited May 2014 in FastReport 4.0
I have a report that printing works correctly. If the assembly is loaded and exporting to PDF does not start with an event such as ReportTitleOnBeforePrint. How to solve the problem? Thanks.

frxReport := TfrxReport.Create(Self);
frxReport.Script.Parent := fsGlobalUnit;
frxReport.LoadFromStream(QuerySestava.CreateBlobStream(TBlobField(QuerySestava.FieldByName('obsah')), bmRead));
frxPDFExport := TfrxPDFExport.Create(Self);
frxReport.Export(frxPDFExport);

procedure frxRepOnStartReport(Sender: TfrxComponent);
begin
  mTextPredSplatnosti.Text := 
    'V na???­ evidenci vedeme n?­??e uveden?© neuhrazen?© faktury, kter?© jsou splatn?© bÄ›hem '+
    VarToStr(<firma."firma_dny_pred">)+' n??sleduj?­c?­ch dnů. Pros?­me o jejich včasn?© uhrazen?­.'  
end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:23AM
    you must call prepare report before
    "frxReport.Export(frxPDFExport);" or there is nothing to export.


Leave a Comment