473,903 Members | 3,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Including Footers on Subreports in Access

68 New Member
My users have a database that they store the rules and requirements for how they do business in. For example: the Fiscal Policy or Board of Trustees Policy. The way the database reports are set up the user can print out the Title Page for the Fiscal Policy Manual and in a separate report the Table of Contents for the Fiscal Policy Manual and in a third report the Policies for the Fiscal Policy Manual. These 3 reports combined make up the Fiscal Policy Manual.

I am being asked to combine these 3 reports into 1 report. I can do this with 4th report that holds the 3 sub-reports. The issue is that each report has a different header and footer (in particular page numbering) and when I combine the reports I can not get the header or footer of the sub-reports to show. If I add a Header to the main report I am getting the header for the 1st sub-report (which then shows duplicative headers), but I can not get the header or footers for the other 2 sub-reports. Is there a way to force the header and footer to show or hide for each sub-report? Or is there a way to set page numbers to start on page 3 instead of page 1?

If you know of a better way to accomplish this and are willing to share with me I would really appreciate the help. I am stumped on this.

Thank you for reading my problem and sharing any solutions you have come across with me.
Jul 9 '13 #1
23 5902
393 Contributor
Page or report level headers/footers?
Jul 9 '13 #2
5,501 Recognized Expert Moderator Expert
We will need the version of Access you are using.

IN V2010, I have a main report that combines two subreports and their headers are shown, (attached), this report was originally made in V2003.

The report headers in the subreports should print.
If the Header information is in the "Page Header" then these are suppressed by the main report. You will have to have either a macro, vba, or a control the refers to the subreport such as in (Allen Browns tip for bringing the totals to the main report

For the page of page... in the main report, page footer, insert text box, set control source to ="Page " & [Page] & " of " & [Pages]

So here's in design view (Sorry, had to cut the right side off due to privacy issues... just the pageofpage thing.)

Here's a cut and paste of the report. Once again, I had to redact some things due to privacy issues. Notice the "Averages", these are in the individual report headers.

Note the pageofpage is usually something like "1 of 20" the control for this is in the page footer of the main report as are the dates (pulled from the form used for the filter) shown at the bottom of the report.
Attached Images
File Type: jpg BytesThread950378_HFinSubRpts.jpg (68.8 KB, 3129 views)
File Type: jpg BytesThread950378_HFinSubRpts_2.jpg (30.8 KB, 2743 views)
Jul 9 '13 #3
68 New Member
ZMBD, thank you for the good information. I appreciated your sample and understood what you were doing. And I liked the linked information about pulling the sum from a Sub-report to a main report. I did not know how to do this previously and I will add this to my tool box. However, I was reading the troubleshooting and number 1 thing to check is "Make sure the total text box is in the Report Footer section, not the Page Footer section."

My problem is that I need the page headers and Footers. Report headers don't repeat and each sub-report has a different page header that is needed on multiple pages. I can't put the page header in the main report because the needs of the sub-reports are different.

The issue with the Page of Pages in the report footer is that I only want them on the 3rd Sub-Report. My boss says it is unprofessional to have page number on the title page of the manual. Picky, picky!

I think this is probably a lost cause but maybe there is a way to get page headers and footers to appear when using sub-reports. If you have any other ideas that I should look into please let me know. I am using Access 2007 but if there is better tools in Access 2010 for this I could talk my company into upgrading to Access 2010.

Thank you very much for any information you can provide even if it is just a confirmation that what I need can not be done in Access.
Jul 10 '13 #4
5,501 Recognized Expert Moderator Expert
The equation can be modified such that:
=iif([page]<=1,"","Page " & [Page] & " of " & [Pages])

As for the page footer, why not use the same concept as AB's article and refer to the report control. We'll have to modify it a tad to account for the subreport names - I haven't done this before so it will take some time to work out.
The other option is to use VBA in the on-print event to transfer the subreport page footer information to the main report footer. Once again not something I've done before; thus, it may take some time to work out.
Jul 10 '13 #5
68 New Member
zmbd, the page formula is on the right track. I am getting no numbers on the first page which is what I want. Do you know of a way to set the page numbers to start at page 1 on page 4? Example: If I hide page numbers for the first 3 pages instead of having page 4 show 4 can it show 1?
Jul 10 '13 #6
5,501 Recognized Expert Moderator Expert
Let's try a workaround for the header/footer.
I still think we can use VBA; however, I'm looking for simple here:
Open the subreport in design view - we will do this for each subreport. To avoid confusing Access, do not open the main report and work with only one subreport at a time.
The context Ribbon "Report Design Tools" will now be available.
Select the "Design" ribbon tab in the context tool ribbon (should be by default on 1st open in design view).
Click on "Group and Sort" in the Grouping and totals group.
This will show the Group, Sort, and Total window at the bottom of the report design window.
Select "Add a Group" - Now this is going to present a list of the fields in the report... ignor the fiels and look at the the bottom of the list, there will be the option "expresion" this is what we want, enter =1 for the first subreport (=2 for the second, =3 for the third - you can use the same =1 for all three; however, I'm setting up for another solution should this not work). The Group Header will be inserted automatically, you will need to click on the "More>" in the Group, Sort, and Total window for the group and then change the footer setting.
You can now go into the properties for the group header/footer and set what you need as for repeating etc...
Move everything in the page header/footer to this group header footer and then shrink your header/footer areas to nothing.

As for the Page number, we'll try some math, if you're going to supress the 1st three pages, so you now have "Page 4 of 200" in the footer, when you want "Page 1 of 200", then subtract 3.

These have all worked on my little test DB here at home.
Jul 10 '13 #7
5,501 Recognized Expert Moderator Expert
Here's what I have for you:

Thus the stuff in the =1 group repeats at the top of each page just like a header/footer.

>Although not shown, the =2 group is in the "55" subreport in the same manner as the "42"
Attached Images
File Type: jpg BytesThread950378_HFinSubRpts_3.jpg (75.8 KB, 3039 views)
Jul 10 '13 #8
68 New Member
zmbd you have been a huge help! The Expression Group solved the Header issue and the report is starting to come together. Because reports 2 and 3 already have 2 groupings the footer expression appears at the bottom of the groupings not the bottom of the page, so that doesn't work as well as the header.

What I have come up with for the Footer on the main report is Formulas based on the pages. Example: The footer for all pages except page 1 need a motto statement so the formula is
Expand|Select|Wrap|Line Numbers
  1. =iif([Page]<=1,"","motto")
This works because I know there is only 1 page for the title that we don't want the motto on.
The page of pages I solved by adding the page numbers to the Table of Contents (page 2 and ...) and subtracting by 1
Expand|Select|Wrap|Line Numbers
  1. =IIf([Page]<=1,"","Page " & [Page]-1 & " of " & [Pages]-1)
Ideally there would be no page numbers on the table of contents. The problem is that for different manuals the Table of Contents can be more than one page so what works for one manual will not work for another. As I was explaining this I thought maybe I could add a field that stored the number of pages for the table of contents then use that field as the minus number in the pages to get the results they want. The problem is the users would not understand what to enter and why. Any ideas on how to resolve this last issue? Can Access determine how many pages exist on a sub-report?
Jul 11 '13 #9
5,501 Recognized Expert Moderator Expert
Which version of Access are you using?
Jul 11 '13 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Matt Howard | last post by:
I was wondering if anyone had any code samples on how to call functions within a Microsoft Access module using ASP.NET. I found a posting on how to do it with C#, but does anyone know how to do it using VB and ASP.NET? Thanks *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
by: Colin McNaught | last post by:
Hi, I find myself having to support a small ASP/VB/Access web application for a customer of mine. (Our main expertise is PHP/MySQL/Apache). Other than testing on the Customers ISP's Server, are there any low cost ways to set up a Server environment in our office to develop/support and test minor incremental changes to the application. We have a W2000 Professional and Office Professional system but no MS Server software. Colin
by: Edward Diener | last post by:
In C++ one can change the access level in a derived class by the "using" keyword. So, for instance, a public method in a base class can be made private in a derived class. Is there any way of doing this in C# ?
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why would you even continue to use Access as a backend when you have a much superior option in SQL express? What about as a future front-end development tool? Let's get serious. Microsoft continues to publish numerous articles and videos on how you...
by: SEFL | last post by:
Hi there, I'm trying to write a VBS that accesses a local database on my system (personal project). I'm running Windows XP 64-bit with Access XP. Every time I try to access the database on the machine, I get the following error: "Provider is not specified and there is no designated default provider."
by: DeanL | last post by:
Hi all, I'm currently pulling out my already thin hair and need a little help if possible. I have an Access 97 db that is used to store inspection information for different regions. My report is meant to show the number of inspections done in each region and what ratings they achieved as below: Region Green Yellow Red NR Total
by: cycnus | last post by:
Does anyone else have the same issue? I'm using Access 2007 and trying to export a DAO recordset to excel using CopyFromRecordset but I systematically get a "Run-Time error 430, Class does not support Automation or does not support expected interface". When I use ADO, it works fine. Everything is up-to-date on my PC, doesn't seems to be any broken references, and everywhere I look, it says that CopyfromRecordSet should work with both...
by: Brett Barry: Go Get Geek! | last post by:
Hello, I just started using Access 2007 after using Access 2003 for a long time. I've created all my queries and they work fine. However, either I forgot or it has changed but, how do I create a report based off of multiple queries? I tried using the report wizard using one query. In the Properties sheet of the report, the record source for the report only shows one query. But if I try and add another text box and add the control
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but got errors of Failed to open file ./outdir/mytestout.txt. Below is the code: #include <stdio.h>
by: glenfernandez | last post by:
HI there, Need a little help with the reporting component of my MS Access 2002 project and would appreciate any insight / help from the experts. Please bear with me as I am still learning Access and this is my first project using it. I'm generating a financial reporting system for a bank and have created a form for user input to dynamically generate the financial reports. So far everything is coming along ok. The reporting options allow...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
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.