Group Header Splits When Spanning Multiple Pages

C

coder09

Hi,

I have a set of subreports, which belong to a larger report, in which
I use Group Headers with the "Repeat Section" property set to "Yes,"
so that the headers repeat when the subreports have enough data to
span multiple pages. The issue I'm having is that if a subreport's
header is at the bottom of the page and the entire header does not fit
onto it, Access will just cut it in half, so that half the header is
displayed on one page and the other half is displayed on the next.
The Detail section displays fine. Any ideas?

Thanks
 
M

Marshall Barton

coder09 said:
I have a set of subreports, which belong to a larger report, in which
I use Group Headers with the "Repeat Section" property set to "Yes,"
so that the headers repeat when the subreports have enough data to
span multiple pages. The issue I'm having is that if a subreport's
header is at the bottom of the page and the entire header does not fit
onto it, Access will just cut it in half, so that half the header is
displayed on one page and the other half is displayed on the next.


Have you tried setting the header section's KeepTogether
property to Yes?
 
C

coder09

Yes, I've tried that on the group header, detail section, and also on
the sorting and grouping fields with no luck.

Thanks
 
M

Marshall Barton

Using KeepTogether to Yes on the group header section should
be sufficient. Are you sure the stuff that is split across
a page boundary is in the group header section?

I don't see how it's relevant, but I feel like I should ask
if this happens any time the group header appears or just
the first time?

Maybe not what you want, but another thing to try is setting
the group's KeepTogether property to With First Detail

The only other thing I can think of that might cause the
problem is if you have some code that is fooling around with
the main report's Page Footer section.
 
C

coder09

I've removed all code and the issue is still occurring. I've also
tried the KeepTogether options that you've specified, with no luck.
None of the options effect the subreport at all, which is strange. I
should note, in the sorting and grouping menu, I have the following
groups defined:

=1 (this is used to allow for repeating the header in subreports)
Time (the time and date fields are used to control the sorting of the
report, maybe this is not the right way to do it?)
Date

Thank you
 
M

Marshall Barton

coder09 said:
I've removed all code and the issue is still occurring. I've also
tried the KeepTogether options that you've specified, with no luck.
None of the options effect the subreport at all, which is strange. I
should note, in the sorting and grouping menu, I have the following
groups defined:

=1 (this is used to allow for repeating the header in subreports)
Time (the time and date fields are used to control the sorting of the
report, maybe this is not the right way to do it?)
Date


The repeat section header should be fine. Is that the
header that's being split? If it is, then you should
probably also have its ForceNewPage property set to Before
Section.

If it's a different group header that's split, please
provide more detailed information about the report.,
 
C

coder09

Yes, the repeat section header is being split. It is the only header
I have, but I have multiple other Field/Expression entries within the
Sorting and Grouping menu (Time and Date), if that effects anything.
I've tried the ForceNewPage property, but it did not have any effect.
Thank you
 
C

coder09

Any more info on this? I've been working at this for hours and am
running out of ideas. Thanks
 
C

coder09

Thanks for the reply. The margins are set appropriately, per what the
printer can accept.
 
M

Marshall Barton

coder09 said:
Yes, the repeat section header is being split. It is the only header
I have, but I have multiple other Field/Expression entries within the
Sorting and Grouping menu (Time and Date), if that effects anything.
I've tried the ForceNewPage property, but it did not have any effect.


How can that be? If it's at the top of the Sorting and
Grouping list, it's the first section in the report (except
for the report header that was never mentioned). After the
first time, the RepeatSection property should only display
it at the top of any subsequent pages.

Barring some bizare corruption, all that just strikes me as
being impossible for Access to mess up. I suspect that Gina
is onto something re the printer. The first thing I would
check is to make sure the Access page height is the same as
the printer's page height. But if your printer's driver is
out of whack then anything can go berserk.
 
C

coder09

I will provide the settings as soon as possible, Gina, as I am out of
the office currently. Marsh, there is a report and page header and
the subreports are in the Detail section. If data in the other
subreports force another subreport to near the end of a page (and the
group header cannot fit), Access will cut it and display the rest on
the other page. Sorry, if I didn't clarify appropriately.

Thanks
 
C

coder09

Gina,

Here are my margin settings:

Top is .256; Bottom is .5; Left is .4; Right is .459. The report is
set to landscape and extends to 10" horizontally. Vertically, there
are approximately 50 subreports, which may or may not appear, based
upon if there is data or not (there is also a report header, page
header, and page footer. This is meant to fit standard 8.5" x 11"
paper.

I've tried modifying the margins upwards and downwards and didn't have
any success.

Thanks
 
C

coder09

Update - I created a test database with one table, one query, and
three reports (one main report and two to be included as subreports).
I was able to reproduce the issue, so that rules out any code issues
or property setting strangeness that may have been a part of the
production database. Don't know if that helps, but it's in the
direction of narrowing down the problem. I'll try to host it
somewhere, so that someone can take a look. I can't attach files on
this forum. Thank you
 
G

Gina Whipp

Which is why I am leaning towards the Printer having the issue. As I said,
had this happen once and drove me crazy until I figured out it was the
printer not the database. It has something to do with the amount of
subreports and the printer not understanding. I am now, in between working
on my regular Client stuff, trying to find the database that I have this
problem on so I can see how I fixed it.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
G

Gina Whipp

coder09,

Okay, I FINALLY found the report! Yippee!!! It occurred because the main
report header and the subreports report header all were vying for the
*report header* section and neither *realized* that they both could not fit.
What I did to fix was... I created my main report and header to always have
the same information and put my subreports in the report footer with page
breaks. I had a logo which I did not wnt to *store* on each subreport so I
placed that in the page header.

I should also note, it was not a Printer issue it was in fact an Access
report issue. I think what it came down to is if the header on the main
report and the subreports exceeds the length of the printable area you get
the overflow and because it is report/subreport and each actually prints
without the others notice they both try to fit. However, if they are both
together do not exceed that length try setting the section to Can Shrink =
Yes.

I hope I explained that so it is understandable!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
C

coder09

Thank you, Gina. I really appreciate you looking that up for me.
However, that is unfortunate that your fix involved page breaks, as
the reason I implemented the group headers and "=1" trick was to
eliminate page breaks and the code that was required to properly
control them with my database. Interestingly, I was not able to make
the subreports break across pages with Access 2007 running in
compatibility mode (Access 2002-2003 database) versus Access 2003,
which I had been using. I guess it's back to the drawing board. If
anyone else has any ideas, I appreciate the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top