Board index » delphi » Composite Reports with Column Header Bands

Composite Reports with Column Header Bands

Hello Everybody !

I've got a little problem when trying to combine two
reports with QRCompositeReport. All reports have Title,
ColumnHeader, Detail, and Summary Bands. First report
is rendering OK, but last report is loosing its column
header band. I even noticed that its BeforePrint event handler
does not fire at all.
Title band serves as a page break between reports
( i.e. it contains BeforePrint handler with NewPage method ).
If I disable TitleBand, I'll get more strange results :
Detail band of second report is redndered on the last page
of first report and Column Header and other stuff on the next
page. What I try to achieve is only to combine those reports
together. Is there any limitation of that kind in using
ColumnHeader Bands in CompositeReport or I missed something ?

Thank you.

Blinov Dmitry.

PS. Delphi version is 3.02, QR version is 3.0.5.

 

Re:Composite Reports with Column Header Bands


Quote
> Hello Everybody !

> I've got a little problem when trying to combine two
> reports with QRCompositeReport. All reports have Title,
> ColumnHeader, Detail, and Summary Bands. First report
> is rendering OK, but last report is loosing its column
> header band. I even noticed that its BeforePrint event handler
> does not fire at all.
> Title band serves as a page break between reports
> ( i.e. it contains BeforePrint handler with NewPage method ).
> If I disable TitleBand, I'll get more strange results :
> Detail band of second report is redndered on the last page
> of first report and Column Header and other stuff on the next
> page. What I try to achieve is only to combine those reports
> together. Is there any limitation of that kind in using
> ColumnHeader Bands in CompositeReport or I missed something ?

FYI,

I've just found the reason of such a strange behaviour.

I consider this is a bug in QR.
Here is an extract from Quickrpt.pas

{ procedure TQRController.Execute; }

if (ParentReport.PageNumber <= 1) and  { Print first column header }
   (SelfCheck is TCustomQuickRep) then
begin
  { Print Column Header Band here - Skipped }
end;

In the case of composite report ParentReport is TQRCompositeReport
and for the second report in it PageNumber is already greater than 1.

As a workaround I can use TitleBand Child with exact copy of
controls on it so it will look like column header after all.

Blinov Dmitry.

Other Threads