TfrxReport.OnBeforePrint for TfrxPage?

Hi all!

I have a fr3 with some <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->OnBeforePrint<!--fontc--></span><!--/fontc--> handlers on the "Code" page. Now I want to transfer these handlers to Delphi.
This is no problem for <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->MasterData1OnBeforePrint<!--fontc--></span><!--/fontc--> which I can handle in <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->TForm1.frxReport1BeforePrint<!--fontc--></span><!--/fontc--> like
  if Sender is TfrxMasterData then
    DoSomething(TfrxMasterData(Sender))
However the equivalent for <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->Page1OnBeforePrint<!--fontc--></span><!--/fontc--> doesn't work because <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->TfrxPage<!--fontc--></span><!--/fontc--> is not a <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->TfrxReportComponent<!--fontc--></span><!--/fontc-->.
I tried using <!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->TForm1.frxReport1PrintPage<!--fontc--></span><!--/fontc--> but this doesn't get called for preview etc.
Any ideas?

Comments

  • gpigpi
    edited 7:04PM
    You can call user function in the Page1OnBeforePrint event (in the script) only
  • edited 7:04PM
    gpi wrote: »
    You can call user function in the Page1OnBeforePrint event (in the script) only
    Then I'll go with that. Thanks!

Leave a Comment