Environment: Delphi 2010, QuickReport 5.0.5
I have a report with 2 bands: Detail band and it's Child band. Problem is sometimes they are splitted on different pages.
I would like to have detail band as a header for child and keep them on the same page always.
After some hours of studying I gave up.
UPDATE: The problem was in dynamically changed height of the child band. I solved it with analyzing of the height and ForceNewPage property.
Does anybody know a solution?
Try using the detail band's LinkBand property.
If the child changes its size, you must calculate it on the parent's BeforePrint event.
I think, bug is in the TQRCustomBand.StretchHeight
method. There are mixed size in units and in pixels:
function TQRCustomBand.StretchHeight(IncludeNext : Boolean): extended;
begin
Result := Size.Length;
if Assigned(FLinkBand) and IncludeNext then
Result := Result + LinkBand.StretchHeight(True) + LinkBand.Height;
end;
I think, this is ordinary mistake and last part ( + LinkBand.Height
) will be removed. But without source code (so only most expensive version) and recompile can't do this. This bug stay from version 3 and still exists in 6.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.