Roger's Access Library Homepage
Forum Home Forum Home > Other Download Libraries > MS Access MVP Libraries > Tejpal, A.D.
  New Posts New Posts RSS Feed - Report_RepFooterformultiColumns
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)


 Post Reply Post Reply
A.D. Tejpal View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 30 Jun 2008
Status: Offline
Points: 192
Post Options Post Options   Thanks (0) Thanks(0)   Quote A.D. Tejpal Quote  Post ReplyReply Direct Link To This Post Topic: Report_RepFooterformultiColumns
    Posted: 12 May 2009 at 1:04am

Sample Db - Explanatory Notes

    This sample db demonstrates handling of report footer for a multi-column report with Down and then Across (D&A) layout in such a manner as to prevent its spill-over to a redundant extra page.

    In a multi-column report with D&A layout, spill-over of normal report footer section to an extra page, despite adequate space being available at the end of last column, is attributable to the fact that page footer has already been hit by the first column. Once that happens, there is no longer any room for the report footer, which has to move over to next page.
    Two alternative styles are demonstrated in this sample db:
    1 - Style A - Use the page footer in dual role:   
    1.1 - This work-around involves placing the controls meant for report footer content also in the page footer. It is to be noted that an actual report footer can not be afforded as it will result in spill-over to extra page if the detail section content on last page is in excess of one column.    
    1.2 - If any calculated values (e.g. Count(*) etc) pertaining to report footer are needed, these can be grabbed via a calculated control in outermost dummy group header. This control can then be referred in the page footer control meant to show report footer content.    
    1.3 - Using page footer's format event, visibility of controls can be manipulated in such a manner that upto the last but one page, only the controls meant for page footer get displayed. On the last page, only the controls meant for report footer get displayed. Certain controls needed in both cases get displayed permanently. For convenient identification, following tag values can be used:   
    (a) Page Footer only - PP   
    (b) Report Footer only - RR   
    (c) Required for both - PR 
    1.4 - Using page header's format event, height of page footer section can be manipulated in such manner that it is at its normal value for pages upto last but one. On the last page, height of this section gets increased to accommodate the requirement for report footer. Simultaneously, it is necessary to manipulate the top and height properties of report footer controls. The task is aided by including normal height of each report footer control as second element of comma separated string serving as its tag value.    
    1.5 -  On other than last page, controls meant for report footer content are set to some arbitrary low height, apart from adjusting their top values - so that section height of page footer section is governed by page footer controls only. On the last page, Top positions & heights of report footer controls are restored to normal values.    
    1.6 - In page header's format event, the height of page footer section is kept sufficiently large to start with. After the tops and heights of individual controls have been set, an interesting alternative is available for snapping back the height of page footer section to a tight fit over the modified size of controls. At the end, simply set the page footer section height to zero. 

    2 - Style B - Place the report footer in an outermost dummy group footer:
    This is an extremely simple solution, not requiring any code. It does have the limitation that the width of report footer is confined to that of one column. If this restriction is not acceptable, style A as described in 1 above, can be adopted.

    Version:  Access 2000 File Format
    Reference required:  Nothing Extra

Back to Top
Sponsored Links

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.