Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport (child) is dropping desired records... 1

Status
Not open for further replies.

ThatNewGuy

Technical User
Jan 19, 2007
47
0
0
US
I'm currently working on a report that's pulling all of my data from a query that's main function is using the "group by" command. For example, if I have 5 purchase order numbers of the same value I only need to see that value once.

Due to the desired report format I have to use a subreport(child) on my parent report in order for everything to line up accordingly. I really haven't worked with subreports in the past but it seems straight forward. I've used the wizards and I've tried setting up a relationship manually. I have a reoccurring problem where the child report keeps dropping desired data. I'm currently using the parent to use as a test so I can view everything on the parent, but the child will only display the first record on my parent report. Yes, I've checked the size of the detail section on the child. I've checked the relationship between the parent and child. I've tried variations of this relationship to no avail. I keep running into the same problem. To make matters worse when I open the subreport that's been generated separately in access all of the desired records are there so I know the relationship works. I just can't seem to figure out why all of the desired records from the child report can't be viewed on my parent report.

Have I missed something in the relationship? Does the subreport have to be in a detail section vs. a page or report header? I'm currently using Access 2003 for this project. Any help would be greatly appreciated at this point.
 
A subreport has a link master/child relationship to the main report. The subreport location depends on the fields in the Link Master. If you group on the Link Master field, the subreport should go in the Link Master field Group Header or Group Footer section. Make sure the header section and the subreport control can grow.

Duane
Hook'D on Access
MS Access MVP
 
To clarify even if the field is previously grouped in my query do I still have to group the subreport in the link master group header or footer section? This link master biz is kind of confusing.

Still no luck after checking some of your suggested settings. I must be missing something here.
 
Normally subreports are grouped. This is possible but generally a subreport will display the details for a specific group in the main report.

If you can't figure this out, you need to provide significant table and field information, their relationships, your link fields, and your report sections.

Duane
Hook'D on Access
MS Access MVP
 
Ok ok...i got it now! I wasn't grouping the report headers and the subreport in the right location. Now, I'm getting the data I need. Only problem is I'm getting giant boxes that over lap the detail sections of the master report even after I've scaled down the subreport. Hmmm...it's never easy. Fix the first problem just to create a new one.

Thanks for the direction Duane.
 
Haha...what happened Duane? My very specific problem of "giant boxes" couldn't be identified from my total lack of information. Let me try this again.

I think it's related to the grouping headers/footers or lack thereof. My desired result is to have the subreport on the top half of the report and the master report to use the bottom half. So my records would look something like this:

Field1 Subreport
Field2 Subreport

[Page Break for formatting]

Field3 Master
Field4 Master

Currently my records are reading:

Field1 Subreport
Field3 Master
Field2 Subreport
Field4 Master

The results from the subreport and master report are all running together in order like a standard report. That's not my objective.

So when I look at the report I have a standard format of:
Report Header
Page Header
Group Header (which contains the subreport)
Detail
Page Footer
Report Footer

I know right now that the problem is the Group Header and the Detail section are back to back which is basically just working like a combined Detail Section. I'm not sure how to correct this even if it is fairly basic stuff.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top