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
This is my calling code in Delphi
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
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