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

Subreport Repeating Values 1

Status
Not open for further replies.

BJNK

IS-IT--Management
Dec 12, 2006
52
CA
I have a Report that shows how many doors need to be built and by what machines. The report itself works fine, but I have a subreport that doesnt want to work. The subreport is based off the same query as the main report, except for it has a function to multiply its total value by 2. This report works fine on its own as well.

The problem is that the subreport repeats its record(s) for each record in the main report that shares the same PartID. The values are identical, Material, Width, Length, etc so they all display in the proper columns, there are just repeating records.

The Child and Master field are linked through PartID.

What am I doing wrong that the subreport tries to make a record for each record in the main report?

Heres a poor design of the report..

PartID
MachineID
MaterialID....... other information (main report)
(Values from Subreport)
 
Normally a subreport won't be "based off the same query as the main report". The subreport should have more detailed tables than the main report. Otherwise, you should move the subreport to a group header or footer so it doesn't repeat.

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]
 
Ok that would explain why a different subreport is working fine. Can you think of a way to achieve what I want through a different method? If not thats fine, I can work with this, just curious what your thoughts are.

Thank you.
 
I am not sure of your table structure or what exactly you want. I provided two possible solutions. Did either work and if not, why not?

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]
 
Yes I simply moved the subreport from out of the details section and into the PartID header, formatted it slightly and now its beautiful thank you. I was just curious if there was some code or something I could do that would be like it Material#=X, X or X then multiply by two. But really I only know a limited amount of VB, so just editing the queries and reports is easier. Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top