Cancel Header if No Detail

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

Hi Groupies

I'm using A2K7

How can I stop a section header from printing if the detail has no data? It
happens all the time on a last page of a report, header prints, nothing in
the detail and then the group footer prints.

Can the header be suppressed in this case?
 
CJ said:
I'm using A2K7

How can I stop a section header from printing if the detail has no data? It
happens all the time on a last page of a report, header prints, nothing in
the detail and then the group footer prints.

Can the header be suppressed in this case?


I don't think that situation can happen. If there are no
detail records, then there is no data for the group header
either.

Maybe there really is a record for that group, but all of
the fields you want to display in the detail section have a
Null value?? Double check the data in the report's record
source table/query. You can also set the detail section's
CanShrink property to No and see if its space is between the
header and footer sections.
 
Hi Marsh.

The subject is not worded very well, my apologies. What I mean is;
sometimes, on the last page of a group, just the group header and group
footer print, no detail.

Lets say a group needs 3 pages to print all of the detail. You turn on the
repeat section option so that the Group Header prints for each page of the
group. The problem can only occur on the last page of a group.

The example I have is occurring on a subreport.
 
CJ said:
The subject is not worded very well, my apologies. What I mean is;
sometimes, on the last page of a group, just the group header and group
footer print, no detail.

Lets say a group needs 3 pages to print all of the detail. You turn on the
repeat section option so that the Group Header prints for each page of the
group. The problem can only occur on the last page of a group.

The example I have is occurring on a subreport.


That's one of those annoying things. You can not fiddle
with a repeat section being displayed. If I remember right,
A2002 would go into an infinite loop if you try to Cancel it
or make it invisible. A2003 fixed the infinite loop by
turning the RepeatSection property off for the whole report.

A widowed header as you're seeing is rather ugly though, so
if you are up to a fair amount of messing around, it's
possible to force the last detail to the last page when
there isn't enough room for the footer at the bottom of the
second to last page. The kind of thing I have in mind will
not work if either the detail or the footer sections can
grow.

Post back if your report meets the restriction and you want
fool around with some report trickery.
 
Marshall Barton said:
That's one of those annoying things. You can not fiddle
with a repeat section being displayed. If I remember right,
A2002 would go into an infinite loop if you try to Cancel it
or make it invisible. A2003 fixed the infinite loop by
turning the RepeatSection property off for the whole report.

A widowed header as you're seeing is rather ugly though, so
if you are up to a fair amount of messing around, it's
possible to force the last detail to the last page when
there isn't enough room for the footer at the bottom of the
second to last page. The kind of thing I have in mind will
not work if either the detail or the footer sections can
grow.

Post back if your report meets the restriction and you want
fool around with some report trickery.

Thanks anyway, Marsh. My detail section has to grow.

I thought I had lost my mind and was missing something that should be easy
to fix.
Apparently not!
 
CJ said:
Thanks anyway, Marsh. My detail section has to grow.

I thought I had lost my mind and was missing something that should be easy
to fix.
Apparently not!


No, you are not missing anything that I am aware of. Most
folks either just live with the widowed header or try to
reduce its frequency of occurrence by using the group
KeepTogether property.

The reason why my idea won't work with CanGrow set to Yes is
because the detail section's Format event would need to know
the final height of both the last detail and the group
footer. The final Height of a section is not available
until the Print event, but the Print event is too late to
affect how the page is laid out.
 
Until lately I can honestly say my Miicrosoft Outlook 2000 worked well. In
the past few days, when you print, iit is gracious and gives you two copies
of you work. Does anyone else experience this problem or have you
experienced the problem and found out how to fix it?
 
Sorry, but this newsgroup is for questions about Access, the database
product that's part of Office Professional.

You'd be best off reposting your question to a newsgroup related to Outlook.
 
Back
Top