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 11:29AM
    You can call user function in the Page1OnBeforePrint event (in the script) only
  • edited 11:29AM
    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

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.