Stretch empty master data

Hello,

I need to generate an invoice where the totals are at the bottom of the page.

It could be that the invoice contains 1 detail line or 20 detail lines.

The problem is that I want to borders to reach the bottom where the totals are located. In the image included the totals are now located right after the detail lines, but I want them at the bottom.

Does anybody have a sample or a simple solution for this?


Thank you,

Dominique


Comments

  • Add empty child band and set his memos' height to Engine.FreeSpace - ReportSummary1.Height - 0.00001 in the child bend on before print event

  • Hi,

    Thank you for answering, really stuck.

    It seems to work for master data that does not stretch, but it does not seem to calculate correctly when it stretches because there are extra lines visible (see screenshots).

    This is the code I have used:

    procedure FillChildOnBeforePrint(Sender: TfrxComponent);

    begin

     FillChild.Height := Engine.FreeSpace - MasterData1.Height - PageFooter1.Height - Footer2.Height - ReportSummary1.Height - 0.00001;

     Line1FillChild.Height := FillChild.Height;

     Line2FillChild.Height := FillChild.Height;

     Line3FillChild.Height := FillChild.Height;

     Line4FillChild.Height := FillChild.Height;

    end;


  • Try

    procedure Footer1OnBeforePrint(Sender: TfrxComponent);

    begin

     FillChild.Height := Engine.FreeSpace - MasterData1.Height - Footer2.Height - ReportSummary1.Height - 0.00001;

     Line1FillChild.Height := FillChild.Height;

     Line2FillChild.Height := FillChild.Height;

     Line3FillChild.Height := FillChild.Height;

     Line4FillChild.Height := FillChild.Height;

    Engine.ShowBand(FillChild);

    end;

    Don't link FillChild to any band

  • Yes!

    Seems to work that way.

    Thank you very much.

  • Hi,

    I'm facing an additional problem.

    Below the masterdata, there is a second masterdata.

    The routine works fine when there is only one record in the second masterdata.



    But if there are more records in the second masterdata, the calculation seems wrong.


    Any idea how this can be solved?

    Thank you,

    Bernaert Dominique

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.