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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Data in SubReport located in Detail Section 1

Status
Not open for further replies.
Jan 18, 2007
39
US
I have a report that consist of a Report Header, Page Header, Part Number Header, Detail, Page Footer, and Report Footer. It also contains a subreport, with details following.

Here is my problem. If I have the SubReport located in the Part Number Header, it does not display all of the data.

If I move the Subreport to the Detail Section it displays all the data, and displays every record twice. I have looked everywhere in the database and searched everywhere on-line for help. I have moved the subreport and manipulated the subreport as well.

In the SubReport I have a Report Header, Page Header, ID Header, Detail, Page Footer, and Report Footer.

I am not very experienced with reports. Both reports have Grouping and Sorting properties as well which I have researched and tried manipulating.

Does anyone know of a solution? Maybe first by telling which area I should have my Subreport. It seems the easiest would be for me to have the subreport in the detail section and figure out how to stop it from printing each record twice.
Any assistance is appreciated.
 
The subreport should be placed in the section based on the field that is used in the Link Master/Child properties. If your link field is PartNumber, then the subreport should be place in a PartNumber header or footer. If PartNumber is unique in the report, the subreport should go in the detail section.

There are no page sections or events or properties of subreports.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks for the Tip. I will give it a try and give feedback. I will be out of town next week and will not be able to get to it until I return.

Thanks Again!!!
 
Oh, you are such a life saver. That worked perfect. Once I added the header of the relationship and placed the sub-report there all was well. And, it only took 5 minutes to change 3 reports.

Thank you so much for replying and helping me with this.
 
Hi Duane,
The problem that I have now is...
I have a main report with the sub-report.
The main report is sorted by part number with the subreport displaying the pertinent information attached to that main part number.

In the subreport in the detail section is the all the cost of sub components. Now some parts have 2 sub components to make the main part number. I am attempting to total the cost in the subcomponent footer of the subreport. If there are two sub components it only captures one sub component cost and not both. In conclusion I am capturing the sum of all part cost in the Report Footer section of the main report.

How can I capture all the pertinent cost for each part in the subreport and get the correct Sum on the final report.

Here are a few more details. I have a field in the Main report header summing the total of the expense fields from the sub report of each part. I have another field doing a Running Sum Over All to get my final total which is deisplayed at the end of the Main Report.
I know this all may sound confusing. If I need to explain better, please let me know.

Thanks,
Phil
 
I would probably forget there even is a subreport. Create a totals query that totals all subcomponents for each part. Add this query to the record source of your main report where you can sum the total.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Duane,
I will give that a try and give you feedback. Just give me a few days. Thanks again for your timely response to my issue.

Thanks,
Phil
 
Duane,
Aside from this request would you happen to know of a very good in depth access book to purchase. I have had exposure to access, however my job now requires me to be the access guru. I would say that I am intermediate to advanced user. The problem is that I have never had the opportunity to use it extensively, what is now required of me. I appreciate your input.
Phil
 
Good books: Check John Viescas' web site The Building Microsoft Access Applications book has 4 complete application on CD with descriptions of the apps in the book. This is a great way to see how an experienced professional creates full applications. John has other recommendations at his site.

There are others mentioned at The Access Developers Handbooks are generally accepted as the best references.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks Duane!!!! I got the reports finished and working well.

I also ordered the books. Thanks again for your time and assistance.

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top