OnAfterCalcHeight Event

PolomintPolomint Australia
edited 12:09PM 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 12:09PM
    Sorry, but OnAfterCalcHeight available in the script only
  • PolomintPolomint Australia
    edited 12:09PM
    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

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.