[AccessD] A2K2 - Report Grouping - Page Numbering

Mitsules, Mark S. (Newport News) Mark.Mitsules at ngc.com
Mon Feb 2 13:22:43 CST 2004


Group,

I am a neophyte in the use of "On Format", "On Print", "On Retreat", etc.
when it comes to Access reports.

I have a report in the format:
Page Header (has no controls and is set to zero height)
Group Header
Detail
Group Footer
Page Footer

This report has a rather unique page numbering scheme.  Until recently,
this report has been rather manageable in size and the page numbers were
entered manually (please don't ask how).  Now, the report size has grown to
a point where I must automate the page numbering.  I need your help.  I
originally asked related questions back in December, but didn't make any
headway.

Here are the requirements:
I must be able to manually input the starting page number.  At each change
in the group header, the page number will increment by one.  Now, here comes
the tricky part.  If a group spans more than one page (i.e. three pages),
then an alpha character must be concatenated onto the page number (i.e.
using the above three page example... 5, 5A, 5B).

So, if the starting page number was "5" the example below would produce 5,
5A, 5B with the next page being 6.  And, yes, a group footer can be pushed
onto a page with no detail records.

Example 2:
Page 1             Page 2             Page 3
****************   ****************   ****************
* Page Header  *   * Page Header  *   * Page Header  *
****************   ****************   ****************
* Group Header *   * Group Header *   * Group Footer *
****************   ****************   ****************
* Detail 1     *   * Detail 1     *   * Page Footer  *
* Detail 2     *   * Detail 2     *   ****************
* Detail 3     *   * Detail 3     *
* Detail...    *   * Detail...    *
****************   ****************
* Page Footer  *   * Page Footer  *
****************   ****************

Honestly, at the moment, I can't even come up with understandable pseudo
code.  Basically, number the first page, see if it continues, add an alpha
if necessary, see if it continues again, increment alpha if necessary, if
not, start next page, increment page number ...loop.

Boy...do I need help with this...both with the nested loop code logic and
where to put it.

TIA,

Mark


More information about the AccessD mailing list