Supress page footer on all but last page.

Hi,

I want to suppress the page footer on all pages of the report except the 
last page.

In the report's On Open event, I run the following code:

    pintPgFootHeight = Me.PageFooterSection.Height     ' Save height for later
    Me.PageFooterSection.Height = 0
    Me.PageFooterSection.Visible = False

In the reports On Page Footer Section Format event, I have the following code:

    If [Page] = ([Pages]) Then
        Me.PageFooterSection.Height = pintPgFootHeight
        Me.PageFooterSection.Visible = True
    End If

The page footer prints on every page with this code.


I also tried the follow code in the On PageFooterSection Print event:

    If [Page] = ([Pages] ) Then
        Me.PageFooterSection.Height = pintPgFootHeight
        Me.PageFooterSection.Visible = True
    End If

And in this case, no footers are printed on any page.


Any suggestions?




-- 
Dennis
0
Utf
2/3/2010 4:36:10 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies
1306 Views

Similar Articles

[PageSpeed] 4

How about using a report footer instead of a page footer?
-- 
Daryl S


"Dennis" wrote:

> Hi,
> 
> I want to suppress the page footer on all pages of the report except the 
> last page.
> 
> In the report's On Open event, I run the following code:
> 
>     pintPgFootHeight = Me.PageFooterSection.Height     ' Save height for later
>     Me.PageFooterSection.Height = 0
>     Me.PageFooterSection.Visible = False
> 
> In the reports On Page Footer Section Format event, I have the following code:
> 
>     If [Page] = ([Pages]) Then
>         Me.PageFooterSection.Height = pintPgFootHeight
>         Me.PageFooterSection.Visible = True
>     End If
> 
> The page footer prints on every page with this code.
> 
> 
> I also tried the follow code in the On PageFooterSection Print event:
> 
>     If [Page] = ([Pages] ) Then
>         Me.PageFooterSection.Height = pintPgFootHeight
>         Me.PageFooterSection.Visible = True
>     End If
> 
> And in this case, no footers are printed on any page.
> 
> 
> Any suggestions?
> 
> 
> 
> 
> -- 
> Dennis
0
Utf
2/3/2010 4:56:01 PM
Daryl,

The report footer prints after the last line of the detail report.  So if 
the last line is in the middle of the page, the report footer prints in the 
middle of the page.

That is the way I originally coded the report, but I need the total to 
appear at the bottom of the report, not in the middle of the page.

I did ask how to force the report foot to appear at the bottom of the page 
and I received this response from Marshall Barton:


Not easily, but it can be done. Add a top level group (View 
- Sorting And Grouping) with footer using a constant 
expression such as =1 Don't add anything to this group 
footer. 

Use code in this group footer's Format event to adjust its 
height to fill the page down to where you want the report 
footer to be. The code to postion the report footer 9 
incehs from the top of the page would be something like: 

Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches 

Private Sub GroupFooter0_Format(Cancel As Integer, 
FormatCount As Integer) 
If Me.Top < FOOTERPOSITION Then 
Me.Section(6).Height = FOOTERPOSITION - Me.Top 
End If 
End Sub 

I have not experimented with scenarios when there is not 
enough room for the report footer on the same page as the 
last detail. 

----------------------------------

Someone else suggested using the page footer.  It appeared that the page 
footers where a simpler solution than the above.  It would be a simpler 
solution if I could figure out how to suppress the the page footers.

One piece of information I may have left out.  The report works great in 
print preview.  The footers do not appear on the first page.  However, when I 
print, the footers appear on all pages. 


-- 
Dennis


0
Utf
2/3/2010 5:16:01 PM
OK, it was worth a shot.  Anyone else have ideas?

-- 
Daryl S


"Dennis" wrote:

> Daryl,
> 
> The report footer prints after the last line of the detail report.  So if 
> the last line is in the middle of the page, the report footer prints in the 
> middle of the page.
> 
> That is the way I originally coded the report, but I need the total to 
> appear at the bottom of the report, not in the middle of the page.
> 
> I did ask how to force the report foot to appear at the bottom of the page 
> and I received this response from Marshall Barton:
> 
> 
> Not easily, but it can be done. Add a top level group (View 
> - Sorting And Grouping) with footer using a constant 
> expression such as =1 Don't add anything to this group 
> footer. 
> 
> Use code in this group footer's Format event to adjust its 
> height to fill the page down to where you want the report 
> footer to be. The code to postion the report footer 9 
> incehs from the top of the page would be something like: 
> 
> Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches 
> 
> Private Sub GroupFooter0_Format(Cancel As Integer, 
> FormatCount As Integer) 
> If Me.Top < FOOTERPOSITION Then 
> Me.Section(6).Height = FOOTERPOSITION - Me.Top 
> End If 
> End Sub 
> 
> I have not experimented with scenarios when there is not 
> enough room for the report footer on the same page as the 
> last detail. 
> 
> ----------------------------------
> 
> Someone else suggested using the page footer.  It appeared that the page 
> footers where a simpler solution than the above.  It would be a simpler 
> solution if I could figure out how to suppress the the page footers.
> 
> One piece of information I may have left out.  The report works great in 
> print preview.  The footers do not appear on the first page.  However, when I 
> print, the footers appear on all pages. 
> 
> 
> -- 
> Dennis
> 
> 
0
Utf
2/4/2010 7:15:01 PM
Reply:

Similar Artilces:

To move to a different page
To move to a different page, display yourself the toolbar ,,page'' and use its functions. Alternatively, use menu Edit > Goto > ... . ...

how to switch between property pages using another application?
Hi, experts I have an applications A which consists 4 property pages. I want to write another application to switch the property pages in application A. How to do it? thanks bangzhong@gmail.com wrote: > Hi, experts > > I have an applications A which consists 4 property pages. I want to > write another application to switch the property pages in application > A. How to do it? Can you add code to application A? If so, use custom messages. Define the message(s) with RegisterWindowMessage. Use CWnd::FindWindow to get application A's main window. PostMessage to it. A...

PAGE NUMBERING IN EXCEL #6
HOW TO PUT PAGE NUMBERS IN EXCEL HEADER/FOOTER AREA. I CAN HAVE THEM IN SEQUENCE, BUT IF I PRINT ONE SINGLE PAGE IT GIVES ME THE NUMBER 1 AND NOT HE CORRECT NUMBER From the menu bar: <File> <PageSetUp> <Page> tab, At the bottom, in the "First Page Number" window, Change the default "Auto", To whatever number you want. -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "ROSA" <ROSA@discussions.microsoft.com> wrote...

displaying a cell's value in a page header when printing
Is there a way to display the value in a cell in a custom page header? (Assume the cell's range is named "CompanyName" and it's located on a worksheet named "DataEntry"). Thanks in advance. Paul Paul Sub CellInFooter() With Sheets("Data Entry") .PageSetup.CenterFooter = .Range("Company Name").Text End With End Sub Could also be fitted into BeforePrint code in ThisWorkbook. Gord Dibben XL2002 On Wed, 19 Nov 2003 18:46:35 -0800, "Paul James" <pponzelliBEGONE@dfiSPAM.caFOREVER.gov> wrote: >Is there a way...

Report: for Items ordered in the last 30-90 days that did not sell
Report for Items ordered in the last 90 days that did not sell or only 20-25% did sell Has anyone written or created a report like this? J VMICC ...

How do I make changes on my home page apply to all pages
I am trying to change my home page to the format that I want. I would like for this to apply to all pages rather than go into all 10 of them one by one. How do I do this?? HELP!!! ...

Supressing Zeros from Printing
Can someone assist me with how to suppress zeros from printing on a SOP invoice. I have a calculated (conditional) field which has a currency result if there is a line item and zero if not. I want to be able to suppress the zero from printing. I tried outputting as a string but I then get the 5 decimal points and no currency symbol. I can add teh currency symbol to the string but how do I remove the 5 decimal points in a string??? Any ideas Double click on the field, or select it and press ctrl-F (Tools >> Field Options). Change the Visibility to Hide When Empty. David Musgrav...

Page format - Landscape & Portrait
Dear all, I would like to set-up a different page format (landscape) in my document holding the other pages in the same document in Portrait. How can I do this? Thanks in advance, Stijn Unfortunately it can't be done the same way you can in Word. You create a separate publication with the different orientation. You can either end up with two files or you could "select all", group, copy, paste the original document, and then rotate it to suit. That's what I would do because I wouldn't want to deal with two files but that's just my preference. You may...

Prints only part of page OT
I have just installed a Kodak ESP7 printer. Both the test page and a file from Wordpad prints, say, the first inch and the rest is blank. I would suspect the printer driver needs re-installing (even though only just installed). Is there anything I should look for please? Thanks. Bill Try this link http://www.kodak.com/eknec/PageQuerier.jhtml?pq-path=10&pq-locale=en_US&_requestid=140 Bill R wrote: > I have just installed a Kodak ESP7 printer. Both the test page and a file > from Wordpad prints, say, the first inch and the rest is blank. I would &...

page number, total pages, section page number and total section pa
I need to add the page number {Page}, total pages (NumPages), section page number {Page} and total section pages {Section Pages} in one Word document. But it fails. When I set the section page number, then the page number change to the section page number. How can I do? To get both the page number of the total pages in the document and the page number in the section, you will need to bookmark the end of each section and use for the page number in the section a Field construction that subtracts the { PAGEREF bookmarkname } from the { PAGE } { = { PAGE } - { PAGEREF bookmar...

Live Page Orientation on Print Preview Mode(MFC Famework)
I'm using MFC Doc/View framework for print preview. i'm getting that standard print preview window.fine. here, i want to dynamically change the page orientation (into lanscape/portrait based on user's selection). also i want to show the papersize selection response. how can i? regards ashok ...

Supress line using cancel skip the line but do not supress CR/LF.
I want to edit a referece number field such that more than one reference number is edited in the field as ref1, ref 2 (Line 1, 2) The reference iself is printed in tho bottom of the report Normally the report process repeat the line. But by using cancel in on_print the line itself disapare, but still å blank line is prodused. How can I also supress the blank line. Ideas? Thanks 2r ...

how to create "print this page" button
I'm making a pdf file and want to create a clickable button on a single page - to make printing it out simple for the person getting it. Where do I find the info to do this? From Adobe. -- JoAnn Paules MVP Microsoft [Publisher] "Lu" <ecosmarte_west@hotmail.com> wrote in message news:Ox5tXOMpEHA.592@TK2MSFTNGP11.phx.gbl... > I'm making a pdf file and want to create a clickable button on a single > page - to make printing it out simple for the person getting it. Where do > I > find the info to do this? > > --- Outgoing mail is certified Vir...

Are there template footers for "Filename and Path" in Excel. How?
I need to set up Excel templates with "Filename and Path" as a Footer on each page. Can this be done and how? Many thanks See http://www.mcgimpsey.com/excel/fullnameinfooter.html In article <09C21F1E-16C4-42ED-BA59-51888C11E056@microsoft.com>, Barb22 <Barb22@discussions.microsoft.com> wrote: > I need to set up Excel templates with "Filename and Path" as a Footer on each > page. > > Can this be done and how? ...

Step-by-step fit to page
Hi I'm an english-only speaker unfortunately forced to use a russian version of excel right now. The problem is that I have a lovely spreadsheet all ready to go, but it is not very tall (i.e. low in rows) and quite wide (i.e. high in columns). Solution: print it on two pages and then fix them together. so far so good. However, having arranged the sheet over two pages in print preview mode, its only printing out on the top left corner of each of the two printed pages. destroys the effect of having on two pages. Help! how can I tell excel to fit each half of the sheet to its respecti...

displaying spreadsheet info on a web page dynamically
I am trying to display a spreadsheets' contents in a web page, and have it auto-refresh to display changes made to the spreadsheet. I've been messing around with it all morning and cant seem to figure out what I am doing wrong. I know it has something to do with external data ranges, save as a web page with pivot table interactivity I believe but I cant seem to get it to work. Can some one assist me with this problem or point me in the direction of some helpful tutorials other than the microsoft tutorials, I browsed threw them but could not find a sufficient solution. Tha...

how do I move from page to page or get the little page icons at t.
I am trying to do a four page booklet and cannot go from page to page. What do I need to do? While waiting for decisions from his 6 university choices, Ed sees a message from Joan <Joan@discussions.microsoft.com>. On it is written: > I am trying to do a four page booklet and cannot go from page to > page. What do I need to do? Do you have four pages present? If you used a template, you should have them there automatically. Otherwise, you'll need to use Insert > Page. Do you have the page icons at the bottom of the screen? If not, try View > Status bar, or maximiz...

Front page: sending newsletter
Hi I am trying to send my newsletter using Front page. Is there any way to send it not as an attachment so it will just come up automatically in the receiver's email many thanks Aoife On my computer, I open the webpage that has my newsletter, click on the envelope at the top middle of the page, and that gives me my newsletter page with email mailing info at the top. It even uses my own address book so I don't have to enter addresses manually. Good luck! Hope that works for you, too. Lanita >-----Original Message----- >Hi >I am trying to send my newsletter using Fr...

Outside page numbers
Prior to updating to Word 2007, it was a simple matter to select from the menu if you wanted page numbers to be on the "inside" or "outside" of the pages. Now I cannot figure out how to do it. Any suggestions would be helpful. You have to enable "Different odd and even" and then place the page numbers as desired in the Odd Page Header/Footer and Even Page Header/Footer. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "MaryGold" <MaryGold@discussions.microsoft.com> wrote ...

change start page number
This is just killing me! I'm trying to edit a file I did a year ago, and I can't remember how to change the document's first page number. In other words, I have two publisher documents that need to be linked together. The first is 30 pages long, so I want the second to begin page numbering with page 31. I currently have it starting at 35, but I can't figure out how to change it. Pleeeeease help. Thank you. Hi Jimmy (anonymous@discussions.microsoft.com), in the Microsoft� newsgroups you posted: || This is just killing me! I'm trying to edit a file I did || a y...

Page header or footer longer than a page. File 794368d5a91da8.rpt.
Anyone seen this before? It only happens when trying to run the report via the CRM interface. The report ran fine last month. It's a copy of one of the canned pipeline reports that comes with CRM, with a date filter applied. Report has no parameters, just a filter. The report runs fine in Crystal. Many thanks i saw this a few weeks back and restarted the crystal services to get rid of it. -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "Jeff Metcalf" <JeffMetcalf@discussions.microsoft.com> wrote in message news:E8B9A1DD-777D-4746-A333-392955F912...

macro to update last character
We are using Excel 2007. We have a large list of id numbers that will need the last character changed from a 1 to 2. The length of the list will always vary but will always be in Column G. For example: 11323674US01 11321507US01 11378181US01 need to be updated to: 11323674US02 11321507US02 11378181US02 Thanks for your help! -- maryj Sorry about the double post.I got an error the first time so didn't think it got posted. -- maryj "maryj" wrote: > We are using Excel 2007. We have a large list of id numbers that will need > the last char...

My multi-page document won't show color
Using Publisher 2003, I create a 12 month staff schedule using a table on each page. I use plenty of color to denote various items in the schedule. Have been doing this for years now, but all of a sudden when I bring up my document it won't show any color or the lines comprising the body of the table. Yet the document prints in full color and all lines show. Perplexing indeed! Read the fourth FAQ here Q: Why can I not see images/shapes/lines when editing my publication? http://ed.mvps.org/Static.aspx?=Publisher/FAQs -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msaue...

Deleted user confused with active user w/same last name
There was a user in our org that is now deleted from the system that has the same last name as an active user still in the system. When someone tries to invite the active user to a meeting they are getting an email error back stating that the deleted user cannot be found in Exchange. The deleted user is not being selected in Outlook for the meeting but for some reason Outlook is trying to invite the wrong user to the meeting. I can't figure out why this is happening, does anyone have any suggestions what I can look for to correct this? Thanks. On 23 Jan 2006 18:25:39 -0800, tdunnusa@...

How do templates appear in each succesive page?
I am using a blood pressure tracker. But the template does not appear on page 2, 3 etc, but just on the first page.... ...