Align a section to the page footer access 2010
-
Saturday, April 07, 2012 10:18 PM
Hello
I am using a report that has "Total Section" right before the "page footer" section.
I want that the "Total Section" will be align together with the "page footer". Or in other words, to be align with the page bottom in general.
I can't find any method to do so.
The problem is that, the Totals supposed to be at the bottom of my page, whether the page is full with details or with half of the details filled. And not be on the middle when there are few details in the "details" section.
Any one has an idea how to solve this?
Thanks
Alu_g
All Replies
-
Sunday, April 08, 2012 1:27 PM
No easy way to do that and it may be near impossible if your "Totals section" (a group footer?) has its CanGrow or CanShrink set to Yes.
The simplest thing you can do is put text boxes in the page footer that refer to the totals stuff in the group footer. Then use the page Header section's Format event to make the text boxes invisible and the group fiiter's Format event to make them visible. Your group footer sectition will always be invisible. Be aware that depending on how it's laid out and how much stuff you have in your group footer, this approach may make the page footer unacceptably tall on pages that do not have your group footer and trying to adjust the Height of the page footer from one page to another is fraught with difficulties.
Another way to approach your problem is to add another level of group footer with nothing in it above your existing group footer. This "extra" group footer would group on the same field/expression as your existing group footer. Then use this group footer's Format event to set its own Height so it takes up just enough space to force your existing group footer to the bottom of the page using something like this untested air code:
Const PAGESPACE As Long ={height of page less top and bottom margins in inches}
Const TPI As Long = 1440 ' Twips Per Inch
Dim TotalsTop As LongTotalsTop = Me.Top + Me.yourgroupfooter.Height + Me.yourpagefooter.Height
If TotalsTop < PAGESPACE * TPI Then
Me.theextrafooter.Height = PAGESPACE * TPI - TotalsTop
Else
Me.theextrafooter.Height = 2 * PAGESPACE * TPI - Me.Top _
- (Me.yourgroupfooter.Height + 2 * Me.yourpagefooter.Height)
End If- Edited by Marshall BartonMVP Sunday, April 08, 2012 1:30 PM
- Marked As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Friday, April 20, 2012 3:03 AM
-
Monday, April 09, 2012 3:08 AM
Alu_g,My sample db named Report_ReportFooterOnTopOfPageFooter, might be of help in providing some working ideas. It is in access 2000 file format and is available at Rogers Access Library. Link:A dummy group footer, whose height is manipulated at run time so as to serve as dynamic blank spacer block, is used for pushing the report footer close to page footer, irrespective of the size of main content on last page.The underlying approach is similar to the one suggested by Marshall. You could try to adapt it suitably so as to push down a group footer (instead of report footer).The sample db takes care of variable grown heights of different sections. Brief description is placed below for ready reference.Best wishes,
A.D. Tejpal
------------Report_ReportFooterOnTopOfPageFooter(Sample Db: Brief Description)=============================This sample db demonstrates placement of report footer on top of page footer. It caters for variable heights of report headers / footers (CanGrow property = Yes). If there is going to be any potential blank space between report footer and the page footer, it is moved above the report footer so that the bottom of report footer sits on top of the page footer.The desired objective is achieved by inserting an outermost dummy group footer whose height is manipulated at run time so as to serve as dynamic blank spacer block.Two stage opening of report is undertaken because dynamic grown heights of report sections are available only in print event. On the other hand, adjustment of section heights is permitted only in format event. Hence the need for extra cycle of report opening.Stage A - First cycle of opening the report, stores dynamic values of Report Footer bottom and Page Footer top in unbound text boxes on form F_SwitchBoard
Stage B - Re-opens the report, duly adjusting the height of outermost dummy group footer, so as to force the report footer bottom to move close to page footer top.Note - In the sample db, 4 lines of text in report header as well as footer are inserted programmatically in unbound text boxes, so as to demonstrate effectiveness of proposed technique duly catering to grown heights of sections concerned.=============================----- Original Message -----From: Alu_gNewsgroups: Msdn.en-US.accessdevSent: Sunday, April 08, 2012 03:48Subject: Align a section to the page footer access 2010
Hello
I am using a report that has "Total Section" right before the "page footer" section.
I want that the "Total Section" will be align together with the "page footer". Or in other words, to be align with the page bottom in general.
I can't find any method to do so.
The problem is that, the Totals supposed to be at the bottom of my page, whether the page is full with details or with half of the details filled. And not be on the middle when there are few details in the "details" section.
Any one has an idea how to solve this?
Thanks
Alu_g
A.D. Tejpal- Marked As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Friday, April 20, 2012 3:03 AM

