473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to cancel unnecessary pages in report?

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
0 1309

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: VBSponge | last post by:
Hi all. In A2K i have a report with a control bound to to calculate the page count for the report. I need to retrieve this page count from the report, and build it into a TOC containing this an...
6
by: noway | last post by:
I have greated a report and have included a page break in it. The report breaks were it is supposed to but then it creates a blank page between the two pages. Since this report will print out...
1
by: David Veeneman | last post by:
I am writing a control that relies on its host to validate the contents of one of its fields. The control fires a custom 'FooNeedsValidating' event and passes the field's data with the event. The...
2
by: Coen | last post by:
Hi, can anyone tell me how to cancel the printing of the current page while in the Printdocument.PrintPage event. I don't want to cancel the whole printjob! I need this for printing only the user...
4
by: Mal Reeve | last post by:
Hello, I have a report that has only 2 levels of grouping. The detail section is simply 1 large block for a memo field. I am finding that on some occasions the report errors and generates...
4
by: Academic | last post by:
Does it make sense to put this If e.Cancel Then Exit Sub at the beginning of form closing events so if the user cancels the app's exiting in one Closing routine he will not be asked again by...
3
by: Birky | last post by:
Hello, I’m hoping you can help me out with two issues I’m having with my code. I have an Access Report named Report_Project_Event_Log which I have calling a Form named “Custom_Code_lookup” which...
6
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from...
2
by: Steve | last post by:
I'm working on a report for an existing database. The report will be a directory of over 500 employees and thus multiple pages. What do I need to do to show the first employee and the last employee...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.