title: Adjusting Subreport object's height in run time
body: <p>Hi i am using FastReports4 with Delphi 7 and i have to produce a report from a form that handles Containers and their stored goods. While building the report i found myself facing the following issue:
  In the main report i have placed a GroupHeader-band which is bound to the Containers datasource. In this i placed one MemoView (called ContainerInfMemo) that bring the container's info, one Subreport to bring the stored commodities info which are stored to the relative container and another MemoView (called GrossWeightMemo) in which i calculate the gross weight of the container with its goods.</p>
  
  <p>Inside the Subreport i placed a MasterBand that is bound to the Commodities datasource, in which i placed another MemoView (called CommoditiesMemo) which prints the commodities details.</p>
  
  <p>Both GroupHeader and MasterData bands have their stretched property set to "true". All the MemoViews have their StretchMode property set to "smMaxHeight" while their ShiftMode property is set to "smWhenOverlapped".
  Finally the Subreport's property PrintOnParent is set to "true" while its ShiftMode property is set to "smWhenOverlapped".</p>
  
  <p>Now, as long as CommoditiesMemo's height is greater than the height of the other two MemoView heights the Subreport is stretching to claim its CommoditiesMemo maximum height and the GroupHeader-band follows by adjusting both its own height as well as its object's height. So everything works as it should. <strong>However in case that ContainerInfMemo's height is the greater one of all other MemoView heights</strong> then i deal with the following paradox:</p>
  
  <ul>
  <li><p>Subreport is stretching as much as its CommoditiesMemo height demands while</p></li>
  <li><p>GroupHeader-band is stretching more than that since its ContainerInfMemo 
  demands more space than the CommoditiesMemo.</p></li>
  </ul>
  
  <p>Thus the final result is to have gaps inside the report between the rows/records of the containers-commodities details.To be more specific i am providing you with the following images in order to provide you an image of how the report behaves and how it should behave</p>
  
  <p><a href="http://i.stack.imgur.com/ooctp.jpg" rel="nofollow">Bad report</a></p>
  
  <p><a href="http://i.stack.imgur.com/6d7Ag.jpg" rel="nofollow">Report as it should always be</a></p>
  
  <p>So i am asking if there is any way to adjust a Subreports or a MemoView's height on run-time. I have to say that i tried by using scripts on the "OnBeforePrint" event of the Subreport and the MemoView but, unfortunately, the engine takes in consideration the height that the relative object has in design-time and not in run-time.
  Is there any way to face successfully this problem ?</p>
  
  <p>Thank you in advance</p>