OnBeforePrint never executes on frxReport.ShowPreparedReport

Hi,

I'm using Delphi XE5.
On my GroupFooter I try to hide several memos in a conditional is met
procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
begin
  ShowMessage('a');                              
  if <frxDB."total_payment"> <= 0 then begin
    Memo27.Visible := False;                                                                              
    Memo28.Visible := False;                                                                              
    Memo29.Visible := False;                                                                              
    Memo30.Visible := False;                                                                              
  end;            
end;

This is my calling code in Delphi
  Report.LoadFromFile(CurDir+'reports/invoice/'+ReportName);
  if Report.PrepareReport then
    Report.ShowPreparedReport;

I found that the OnBeforePrint event never fires when the report was showing after frxReport.ShowPreparedReport command, but when I tries to preview it in the designer, it works just as normal.
I keep wondering what did I miss.
Anyone can help?

Thanks

Comments

  • gpigpi
    edited 3:06AM
    Did you uninstall FR Embarcadero edition completely if you have installed FR Embarcadero edition?

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.