Creating Report with a Subreport

M

mlane

I am a novice user trying to create a report in Access 2007.

I am creating a report from my association's member database. Each report
consists of the member company's profile, and includes a subreport with the
contact details for the company's sub members, if they have any, inserted in
to the body of the main report. The reports are linked by a field called
Member ID#.

My problem is that what I am calling a report entry (a profile of one
coumpany, including the sub member subreport) is printed for each submember,
so if 5 subcontacts are listed for a particular company, 5 reports are
created for that company. If there are no submembers associated with that
record, no report is created.
I created the report in design view, and inserted the subreport using the
subreport wizard.
What can I do so that there is exactly one report page corresponding to each
record? I would appreciate simple instructions, becasuse I really don't know
what I am doing.
Thank you very much!
 
A

Arvin Meyer [MVP]

Create the subreport first and make sure that all the entries are in place,
listed as they would be on a continuous form. Make sure that the CompanyID
is included in the subreport, but you can set its Visible property to False.

Now turn on the toolbox wizards (the magic wand icon in the toolbox) Create
the main report and add a subreport control. The wizard will pop up and ask
the name of the subreport. Then it will ask which field to link on. Answer
that the CompanyID field (or whatever you've called it) is the linking
field. That's all you need.
 
M

mlane

Thanks for your quick reply! Unfortunately, I think that I followed most of
your instructions and still had the same problem. I did not create a new
main report using the report wizard but did it in design view instead. I
used the report wizard to create a report of the submembers, and inserted it
into the main report using the subreport wizard. I linked it as directed. I
continue the have the problem where multiple identical pages are inserted
into the report for each member company. The number of extra pages for each
record corresponds to the number of employees listed as sub members in the
subreport. Do you understand what is happening? I would appreciate any
advice you could give.
Thanks!
Michael
 
A

Arvin Meyer [MVP]

You are getting multiples because it can't link on the Key. Open the report
in Design View, select the subreport and open the property sheet. On the
Data tab, check the Link Master/Link Child values, they must be correct or
you will get multiples.
 
C

Charles

Arvin,

Just wanted to say thanks for answering mlane's question. I was able to use
the same information myself for the same problem.

mlane,

If you're receiving notification of replies and Arvin answered your
question, please return to this posting and annotate it. This will help the
next person as well. I myself request that all threads (answered or not)
that match my query are displayed but some folks don't have the time to read
through every thread and only look for the answered ones.

Thanks for asking the question before I did mlane, and thanks Arvin for
answering it. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top