OnAfterCalcHeight Event

PolomintPolomint Australia
edited 11:06AM in FastReport VCL 5
To solve a problem with a report, I think the best way would be to use OnCalcAfterEvent on my "DetailBand".

In the Delphi code for the report I have successfully created the procedure:
procedure TGLOWreportStatements.DetailBandAfterCalcHeight (Sender : TfrxReportComponent);
{ TODO 5 -oAnyone -cProblem : PR00903 Statement Reports alternating coloured bands show two consecutive coloured bands at top of some pages. }
begin
  if DetailBand.Height < Report.Engine.FreeSpace then begin
    BandColour.Restart;
    Report.Engine.NewPage;
  end;
end; {TGLOWreportStatements.DetailBandAfterCalcHeight}

The code compiles OK, but isn't linked into the executable. Obviously I have to "assign" it to the band's event. But how?

(I know how to do this within the FR editor, but I don't want this code in Script, but Delphi.)

Any advice?

Cheers, Paul

Comments

  • gpigpi
    edited 11:06AM
    Sorry, but OnAfterCalcHeight available in the script only
  • PolomintPolomint Australia
    edited 11:06AM
    Ahh! That explains it. I was beginning to think I'd lost the plot! [img]style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> Shame about that... Cheers, Paul[/img]

Leave a Comment