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 3:17AM
    you must call prepare report before
    "frxReport.Export(frxPDFExport);" or there is nothing to export.


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.