New Blog Post: RESTful Reporting

19.04 trial - how to code event handler

I use RB 10+ years ago, now need to get myself into it again.
I am using Delphi 10.1 Berlin and downloaded 19.04 trial, put a TppReport onto the form and open it, is there a way I can code the onPrint/beforePrint event of detail band, footer band,...etc?
I don't see Event tab in "object inspector".

This might be a trivial question as I nearly totally forgot how to use RB now.

Comments

  • edited May 16
    Hi Ricky,

    At Delphi design-time you can use the Delphi object inspector (not the inspector built-in to the report designer) to assign event code by selecting the "Events" tab at the top.

    It is also possible to implement event code in RAP using the Calc tab of the report designer.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 17
    Hi Nico,

    Sorry I might not have made it clear.
    If I want to code the beforeprint event of footer (not the whole report), eg. change the color of a label, how do I do that?
    Is that the limitation of trial version?

    eg. from the RBuilder.pdf, page 67:
    procedure Form1.ppDBText4Print(Sender: TObject);
    begin
    if(DBPipeline1['PRICE_CHG'] >= 0) then
    ppDBText4.Font.Color := clBlack
    else
    ppDBText4.Font.Color := clRed;
    end;
  • Hi Nico,
    OK, finally I figured that out what you talked about.
    Open report designer, select an object inside report designer, eg. detail band, go back to Delphi Object Inspector Events tab.

    Thanks
Sign In or Register to comment.