Results 1 to 5 of 5
  1. #1
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123

    Multiple-column page totals

    Hello all,

    I've been handed a situation that I've not encountered before.

    Is there a way to design a report that's set up to have three columns of data across the page to report totals at the bottom of the page for each column?



    Please see the attachment for an example of the requirement -- you'll note that the "column totals" section is repeated three times across the page. This is what I would need to imitate. Depending on the data involved, there could be up to two more identically-formatted pages that would follow this one, so I would want the "column totals" section to function as if it were a page footer.

    TIA,
    Steve
    Attached Thumbnails Attached Thumbnails ps8042 P2.jpg  
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931

    Multi-column format report with column totals

    Setting up the column format is easy, calculating an independent total for each column on each page is not. Can't find anything on the web about this.

    This is a unique challenge but I have developed something. Review attached sample db. Open the report in PrintPreview.

    Design has these requirements:

    1. A unique ID field (or combination of fields) that the records will be ordered by. Autonumber datatype can serve this purpose.

    2. A unique ID field that has no gaps in sequence. I have field in table just for this purpose and a function that will populate the field. I include it as an example just in case the unique ID in item 1 cannot be depended on for no gaps. I did not test with filtered recordset but think will work.

    3. A query in which column and page numbers for each record are calculated and this query is used as RecordSource for the report.

    4. DSum function in report page footer to calculate the column totals.

    5. Structure report so the same number of rows will display on each page. This constant is necessary for the column number, page number, and totals calculations. This means no report header/footer on the same page as the first and last pages of detail records.
    Attached Files Attached Files
    Last edited by June7; 04-21-2012 at 04:18 PM.

  3. #3
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    June7,

    Thanks for the example. I'll take a look at it to see how it works.

    After the original post, it came to me that I could do what’s needed using a collection of sub-reports,each of which would just report the sub-range of rows needed for each column along with their totals, and a separate parent report for each “page”. Which page(s) would get printed is determined by the total row count in the data.

    I'll evaluate both alternatives and see which works best. That PDF example isn’t just a “representative sample”; I actually need it to be formatted exactly the same as that Postal form: same number of rows per column,3 columns wide, etc. We’d be submitting the report to the Post Office as a ‘facsimile’ of the form I posted – while it may not have the USPS logo or use the same graphics or typeface, everything else on the original form needs to be duplicated in the report.

    Steve

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    The subreport approach did occur to me but couldn't see how to accomplish for multiple pages without a lot more VBA. I think will have to print out one 'page' at a time. Something I have to do in a complex multi-page report in my project. The example can be viewed at http://forums.aspfree.com/microsoft-...ry-322123.html

    Regardless of the approach, the last page will probably never be full.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    June7,

    After experimenting with both alternatives, I ended up going down the subreport path. I've attached a PDF of my version of the report using some fictitious data; you can see it gets pretty close in format to the original -- close enough that the USPS staff to whom we will submit the report has reviewed and accepted it.

    VBA is not a problem for me; I'll be taking this now and wrapping some VBA-supported data-entry and reporting forms around it so that I can hand it off to other people in the company with no Access experience at all. As far as they'll be concerned, to print the report they just click the "Print" button; behind the scenes the number of pieces entered will be used to determine which of the 4 pages of the report get printed.

    Thanks for your assistance,
    Steve
    Click image for larger version. 

Name:	rptPS8042.jpg 
Views:	5 
Size:	199.6 KB 
ID:	7364

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 12-06-2011, 11:18 AM
  2. Replies: 0
    Last Post: 11-04-2011, 06:09 AM
  3. Query Column Totals
    By lmp101010 in forum Queries
    Replies: 1
    Last Post: 08-06-2010, 01:03 PM
  4. Replies: 7
    Last Post: 12-07-2009, 07:27 AM
  5. Replies: 0
    Last Post: 06-07-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums