Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with grouping and Page Breaks in QuickReport

574 views
Skip to first unread message

Kelly Turner

unread,
Mar 9, 1998, 3:00:00 AM3/9/98
to

I need some help and the help files are doing much for me. I have a QR
(Delphi 3) with a group band. What I want it to do is go to the next
page if the data won't all fit on the page. When I did the report in
ReportSmith (Delphi 2) they had an option to keep detail together. Is
there something like this in QuickReports? Any help would be
appreciated.

Thanks,
Kelly Turner
scar...@apk.net


Wade Trupke

unread,
Mar 9, 1998, 3:00:00 AM3/9/98
to

Hi Kelly.

There is a way to keep a series of bands on the same page. It isn't
pretty, but it works.

//if this section would go over the end of the page, start a new page

if QuickRep1.CurrentY > (QuickRep1.Page.Length -
QuickRep1.Page.BottomMargin -
Sender.Size.Height -
QRBandA.Size.Height - ...) then
Begin
QuickRep1.NewPage;
End;


Now, in English...

Basically, you take the height of the page, and subtract the height of
the page footer (if there is one), the height of the current band, and
the heights of any bands you want to stay on the same page. The result
is how much height would be left on the page. If CurrentY is greater
than this amount, that means that you've already used too much of the
page, and the block you want to keep toghether would go over. It then
calls for the start of a new page, so the block will stay together.

A quick warning: I believe there are problems with this method if you
have elements on the bands that can grow taller (i.e. AutoStretch
property is True). I'm not sure how to make this work in those cases).

Good Luck!
Wade Trupke

Kelly Turner

unread,
Mar 15, 1998, 3:00:00 AM3/15/98
to

Ok, this worked for the first page, but because of the fields and the way
they are on the report I have to have Autostretch set to true (because of
word wrap). Does anyone have any ideas as to how to fix that? As soon as I
figure this part out I am done with this project....so I'd appreciate any
help I can get!

Thanks,
Kelly
scar...@apk.net

0 new messages