Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-23-2019, 07:52 AM   #1
Punice
Newly Registered User
 
Join Date: May 2010
Location: Middletown, VA
Posts: 103
Thanks: 46
Thanked 1 Time in 1 Post
Punice is on a distinguished road
Correct formatting of main & subreports Access 2007

Having a lot of trouble designing a report with a subreport.
First Issue:
Initially, i want to know if I am formatting it correctly. Here is what I have:
Report Header - - Holds the main report title;
Page Header - - - The control header column names for the main report;
===========
Detail - - - - - - - The record data for it
Page Footer - - - Holds the subreport title;
Page Header - - - The control header column names for the subreport;
Detail (2nd) - - - The subreport data.

The report almost displays correctly, except that the main report displays multiple repetitive records. We can work on that problem, after I learn
whether or not I need to format the thing differently from what I am doing now.

I've read & tried the available help, but no joy.

Punice is offline   Reply With Quote
Old 09-23-2019, 09:01 AM   #2
plog
Banishment Pending
 
Join Date: May 2011
Posts: 9,404
Thanks: 11
Thanked 2,282 Times in 2,234 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Correct formatting of main & subreports Access 2007

Quote:
The report almost displays correctly, except that the main report displays multiple repetitive records
Most likely this is an issue with the data source the report is based on. I think you should put aside your Report for now and focus on your queries that feed it--if the data is wrong there it can't but help to be wrong in the report.

So, post sample data from the query/table your report is based on as well as its SQL if a query. Also, tell us why it is not correct for what you want.
plog is offline   Reply With Quote
The Following User Says Thank You to plog For This Useful Post:
Punice (09-23-2019)
Old 09-23-2019, 10:33 AM   #3
Punice
Newly Registered User
 
Join Date: May 2010
Location: Middletown, VA
Posts: 103
Thanks: 46
Thanked 1 Time in 1 Post
Punice is on a distinguished road
Re: Correct formatting of main & subreports Access 2007

When I used the query to display the records for a main report before I added the sub-report the records were displayed correctly.
Before I continue, though, my main concern is still whether or not I am formatting the subreport in the proper places on the report in the design mode.

Punice is offline   Reply With Quote
Old 09-23-2019, 10:47 AM   #4
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,045
Thanks: 20
Thanked 382 Times in 375 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: Correct formatting of main & subreports Access 2007

Can you post a sample DB with the report/subreport?
Mark_ is offline   Reply With Quote
Old 10-05-2019, 07:56 AM   #5
Punice
Newly Registered User
 
Join Date: May 2010
Location: Middletown, VA
Posts: 103
Thanks: 46
Thanked 1 Time in 1 Post
Punice is on a distinguished road
Re: Correct formatting of main & subreports Access 2007

I solved my problem by using a very unprofessional method that i thought I'd try.
I copied the sub-report's page header, where the wizard placed it, to the sub's report header, just below the sub's title.
Then, used the 'Add Existing Fields' tool, to place the matching header data fields to the detail section of the sub-report. I deleted the fields that were the pseudo(?) header fields.
Doing that worked. I guess the old adage from my Fortran days, circa 1960, is still true,
which is 'if if works, it's a good program'. That's why programmers rely on the Q&A department to perform the magic.
This 84 year old EE who has never been trained to be a programmer, is a happy camper and will continue peeling this db development onion until I am finished with it.
Thank you all for helping me. This is my savior furm. It's the best.
Punice is offline   Reply With Quote
Old 10-06-2019, 07:29 PM   #6
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,263
Thanks: 15
Thanked 1,592 Times in 1,512 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Correct formatting of main & subreports Access 2007

The main report query should include ONLY data for the main report. Remove any tables with data that belongs in the subreport.

The Report Header appears once and only once for a report. I almost never use it. The only time is ever use it is if I have something like instructions or an explanation that I need to print only once. I put the report title at the top of the Page Header because I like it to print on every page.

It would be very unusual to put a subreport in the page footer. The Page Footer prints at the end of every page. This is not a logical data break. It is simply, that the report cannot print all the detail items on a single page so it needed to roll to a second page. If there's room to print 20 lines of invoice detail on a page and an invoice has 21 items, the 21st will print on page 2.

I'm going to guess that you might want to add some sorting and grouping once you fix the RecordSource for the main from and perhaps the subreport belongs in a group footer.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Tags
format , placement , subreport

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Subtract totals from 2 subreports in main report of access magickmann Reports 2 12-29-2014 07:49 AM
Main Report and Subreports luvphx09 Reports 8 01-28-2014 05:51 PM
Query In Access 2007 Not Displaying Correct robertbwainwright Queries 0 05-02-2012 05:08 AM
Access 2007: Main Report Two SubReports Not Keeping Together sgtSortor Reports 0 01-07-2009 10:29 AM
2 Subreports in Main Report Jonathan Lueb Reports 4 05-07-2007 07:09 PM




All times are GMT -8. The time now is 11:10 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World