Position of the band

Hi everybody. We have a little problem with FR4.

We're designing an invoice and we need to print the total band at the bottom of the page. On the event "onbeforeprint" of the band, we have the next source code:
if engine.freespace > GroupFooter1.Height then
  begin
    Engine.CurY:= Engine.PageHeight - GroupFooter1.Height - 1;
  end

If the band has enough free space, it's no problem: it prints the band in the rigth position.
But if it hasn't free space, it jumps to the next page, but it doesn't re-run the eventm so the cursor is not changed to print it at the bottom (it prints the band at the top of the page).

How could we set the event to solve this problem?

Thank's

Comments

  • gpigpi
    edited 7:05PM
    Try
    if engine.freespace < GroupFooter1.Height then
      Engine.NewPage;
    Engine.CurY:= Engine.PageHeight - GroupFooter1.Height - 1;
    

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.