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_SubRepSetMaxRowsPerPg
  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_SubRepSetMaxRowsPerPg
    Posted: 27 Sep 2011 at 12:01pm

Explanatory Notes

    This sample db demonstrates custom setting of maximum number of rows per page for one or more subreports.

    Setting of forced page breaks in subreport's detail section, though effective, suffers from the drawback that the subreport control on parent report gets forced to full page height. As a result blank space on main report goes waste. Though not recommended, this method has been demonstrated as the last option, just for academic interest.

While using forced page break in subreport, it has to be ensured that CanGrow property of subreport control on parent report is set to Yes. Otherwise the subreport does not get displayed beyond first page. In fact what happens is that as a result of forced page break, the subreport control with CanGrow as Yes, expands suitably so as to span multiple pages as needed.    

    Following styles are demonstrated in the sample db:
    1 - A1: Single SubReport Style 1:
         The desired effect is achieved by conditional cancellation of detail format of subreport for records not falling in the target block determined by parent report's current record number. It is like obtaining a filtered output matching target block of sequential numbers. The number of pages on parent report is restricted to the minimum required for the subreport.

    2 - A2: Single SubReport Style 2:
         Similar to A1. However, the number of pages on parent report is not restricted. It can exceed the minimum required for the subreport.

    3 - B1: Two SubReports Style 1:
         Similar to A1 above, but with two subreports, each with its own setting for max rows per page.

    4 - B2: Two SubReports Style 2:
         Similar to A2 above, but with two subreports, each with its own setting for max rows per page.

    5 - C: Single SubReport With Forced Page Break:
         Not recommended. Included for academic interest only.

Version: Access 2000 file format.

References: 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.