Printing lines to fill empty space on the bottom of the page between masterdata and pagefooter bands
My masterdata band has stretched property set to True. In masterdata band every field has vertical frame lines.
If amount of records is several pages or longer, I want at the end of each page if another record can not fit on the same page that free space between masterdata band and pagefooter band to have lines stretching to the pagefooter.
In order to do that I have child band "ChildFrameLines" which purpose is to draw lines and fill the empty space between masterdata and pagefooter.
procedure MasterData1OnAfterPrint(Sender: TfrxComponent);
begin
  if Engine.Freespace < MasterData1.Height then
    Engine.Showband(ChildFrameLines);
end;
procedure ChildFrameLinesOnAfterCalcHeight(Sender: TfrxComponent);
begin
  ChildFrameLines.Height := Engine.Freespace;
end;
This code does the job except in one case.
Let's say the last record on the page (10th data record) didn't have need to strech and the first record on next page (11th data record) requires the master data band to stretch itself to show all the data.
What happens is that after the report prints the last record on the page it goes to MasterData1OnAfterPrint event and checks whether to showband ChildFrameLines.
It says that masterdata1.height (of the 10th record) is bigger then Engine.Freespace and it does not show ChildFrameLines. Since the 11th record is strecthing masterdata band it goes to the next page and ChildFrameLines was not called when it should of been.
Any help appreciated.
Comments