473,549 Members | 5,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Fo rmat(Cancel As Integer, FormatCount As
Integer)
If Me![Total Schools] <= 1 Then
Cancel = 1
End If
End Sub

Private Sub ReportFooter4_F ormat(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 1324

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

Similar topics

1
5162
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 other reports. All the reports are page-numbered consecutively in the order they are printed (there are 7 reports in total, with about 60 pages in...
6
4688
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 approx 20 pages (without the blank pages) it is large waste of paper. I have tested the report by setting the data source so that only one page will...
1
5239
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 host handles the event, validates the data and returns the validation results to the control by a callback to a control method, SetFooError(). All of...
2
4966
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 defined selected pages or the from/to pages. Coen
4
3145
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 hundreds (perhaps even an infinite loop...I have to break the system to stop the report generating) of pages. While I'm not 100% I think this may...
4
2986
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 another when its form Closing routine is run? I guess what I'm asking is will that work. If one form sets e.cancelled to true will e.cancel be...
3
2254
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 allows a user to select data for the report. I have a hidden txt object within this form named txtContinue which is either set to “no” or “yes”. I...
6
2897
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 which a user can choose a specific report to generate. The user selects the report of choice then presses a comand button (CmdRunRpt). The command...
2
2526
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 on each page at the top of each page? For example, on page 2: Clinton to Kennedy on page 5: McCain to Obama Thanks! Steve
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7962
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7480
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7814
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5373
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.