Question : QuickReports keep text together

We have an address field that we do not want to break over columns or pages.  How can we make a child band or a subdetail band print within a column or page?

QR v 3.6.2, Delphi 6

Answer : QuickReports keep text together

(I hope to have right understood the Q.)

In a report of mine I check for the available space before to print the column and if it is less than required I force a newpage.

Something like this

procedure TForm1.ColumnHeaderBeforePrint(Sender: TQRCustomBand; var PrintBand: Boolean);
var
  Needed: extended;
begin
  DetailBand.ExpandedHeight(Needed); //get the height required by the detailband
  Needed := Needed+Sender.Height; //add the columnheader height
  if Needed > QuickRep1.availablespace then
//There is no more space in this page? Let's print on a new page
    QuickRep1.newpage;
end;
Random Solutions  
 
programming4us programming4us