blank pages or runins with group footers

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

I have subreports in my report (4 of them). They are set
in a group footer so they will show at the end
(preferrably on a new page).

I have the group footer to force new page "After section".
This keeps the next report on a new page.

my problem is that I cannot seem to get the group footer
to start on a new page in a method that makes me happy.
If I set the group footer to force new page "Before and
After Section" it works great for the reports that have
the subreports attached. However for those reports that
have no related information to any of the subreports
(which is often the case), I wind up with a blank page
after them.

Is there a way I can have a nice smooth (professional-
looking) way to have this effect through code or some
other means?

I'm using A97.

many thanks in advance to anyone who can help out.
 
Kim,

I haven't checked this, but I am pretty sure it will work to put a Page
Break control at the top of the group footer section, and then use code
similar to this on the On Format event of the group footer section...

Me.NameOfPageBreak.Visible = _
Me.NameOfSubreport1.HasData Or _
Me.NameOfSubreport2.HasData Or _
Me.NameOfSubreport3.HasData Or _
Me.NameOfSubreport4.HasData
 
HasData doesn't appear to be supported by Access 97

i get a runtime error:

Runtime error 438
object doesn't support this property or method

any suggestions as to what I may use as a substitute?
 
Kim,

My humble apologies, I gave you poor instruction! Try this...

Me.NameOfPageBreak.Visible = _
Me.NameOfSubreport1.Report.HasData Or _
Me.NameOfSubreport2.Report.HasData Or _
Me.NameOfSubreport3.Report.HasData Or _
Me.NameOfSubreport4.Report.HasData
 
Thank you, it also works to move the subReports into the
Details sections or else you wind up with the blank pages
again.
 
Back
Top