By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,835 Members | 1,959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,835 IT Pros & Developers. It's quick & easy.

How to cancel unnecessary pages in report?

P: n/a
Hello
I have got a report, which can run on 3 groups of data:
College
Faculty
School
Faculty contains schools. College contains faculties.
The report can be run for college, then it includes several faculties
and requires report footer, where totals for college are calculated.
The report also can be run for a faculty. Then it includes several
schools and requires faculty group footer, where totals for faculty are
calculated, but it doesn't need report footer any more.
The report also can be run for a school. in this case, it doesn't need
report footer and faculty group footer.
I have managed to get reed of footers. To do so, I run running sums
"Total Schools" in the school group footer and "Total Groups" in the
faculty group footer. Then the following code switches off printing of
unnecessary footer(s):

Private Sub GroupFooter5_Format(Cancel As Integer, FormatCount As
Integer)
If Me![Total Schools] <= 1 Then
Cancel = 1
End If
End Sub

Private Sub ReportFooter4_Format(Cancel As Integer, FormatCount As
Integer)
If Me![Total Groups] <= 1 Then
Cancel = 1
End If
End Sub

The problem is that when I run the report for 1 school only, page
header still prints on a page, where faculty footer would have been
printed.

When I run the report for 1 faculty, the report footer doesn't print,
but an empty page does.

How can I get rid of unnecessary pages altogether?
Thank you.
Galina

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.