Estimating the height of Expanding Bands

The following code will allow you to estimate the height of an expanding band before it prints.

Estimating the height of Expanding Bands
========================================
The following code will allow you to estimate the height of an expanding band before it prints.
This is an unofficial change to QR3 source code.
It will break compatibility with TChart.
This adds a procedure 'ExpandedHeight' to class TQRCustomBand.
You can use it to stop a band busting a page like this -
procedure Trepform.DetailBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
var
    th : extended;
begin
    detailband1.ExpandedHeight( th );
    // force a new page if required.
    if th > quickrep1.availablespace then
             quickrep1.NewColumn;
end;
The Changes.
Two files are amended - qrctrls.pas and quickrpt.pas
1. quickrpt.pas
1.1 declare a new Private var in class TQRCustomBand
private
    FExpandedHeight : extended;
    ..
    ..
1.2 Move the declaration of 'Function AvailableSpace' to Public.
1.3
Add this Public method to the class TQRCustomBand
procedure TQRCustomBand.ExpandedHeight( var NewHeight : extended );
var
  BottomGap, I : integer;
  OrgLength, ScrToPrinter  : extended;
  theight : extend