Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Subreport begins printing above top margin of page

edited July 2006 in Subreports
I am using ReportBuilder version 10.0 on Windows XP, SP2. My printer is
an HP LJ8150.

I have multiple subreports contained within another subreport.
Occasionally, one of the subreports begins printing above the printable
area of the page upon which it is rendered. This only occurs when the
subreport is too large to fit in the remaining space of the preceding
page and is the first subreport to print on a page.

All the subreports have their ShiftRelativeTo properties set to the
subreport above them. I have tried setting the OverFlowOffset property
even though it doesn't seem that the subreport actually starts on the
previous page and that has done nothing. KeepTogether was set to false
for all subreports in the particular section including the parent
subreport.

I have set the KeepTogether property to true for the parent subreport
and now the child subreport prints completely within the page. However,
the parent subreport, which was placed below and shifted relative to
another subreport, begins on the second page of the report because it
typically is too large to completely fit in the first page after the
first subreport. This is unacceptable for my client. I must find a way
to force the subreport to begin within the printable area of the page.

Here is a model of what I had initially:

Subreport A -- KeepTogether = true
Subreport B -- KeepTogether = false, ShiftRelativeTo = Subreport A
Subreport B1 -- KeepTogether = false
Subreport B2 -- KeepTogether = false, ShiftRelativeTo = Subreport B1
Subreport B3 -- KeepTogether = false, ShiftRelativeTo = Subreport B2
Subreport B4 -- KeepTogether = false, ShiftRelativeTo = Subreport B3
Subreport B5 -- KeepTogether = false, ShiftRelativeTo = Subreport B4
Subreport C -- KeepTogether = true, ShiftRelativeTo = Subreport B
Subreport D -- KeepTogether = true, ShiftRelativeTo = Subreport C

Whenever Subreport B3 couldn't fit on the remaining space on a page, it
would print on the next page, but it would print such that only the
bottom 1/3 of the subreport was visible at the top of the page.
Subreports B4 and B5 printed normally.

When I changed the KeepTogether property of Subreport B to true, then
Subreport B3 printed correctly with the entire subreport visible.
However, the total content of Subreport B often wouldn't fit on the
remaining area of the page after Subreport A and a large blank area is
left at the bottom of the page after Subreport A.

I need to know what is causing Subreport B3 to begin printing above the
top margin of the page and fix that problem.

Thanks,

Mark



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited July 2006
    It appears that setting KeepTogether to false on the subreport in
    question did not actually change the value in the DFM file. I changed
    the value in the DFM file, set the KeepTogether property to false for
    the parent subreport and it appears to be rendering correctly now. I
    still can't figure out why the "KeepTogether = true" caused the
    subreport to print above the top page margin.



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.