Report / subReport

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a report that uses a subreport. If the detail goes to a
second page the subreport does not print. The master and child are linked by
employee ID.

Not sure what I have or am doing wrong. In the past I have had no problems
with a report/subreport.

Any assistance would be appreciated.

Fred Alyea
(e-mail address removed)
 
There are many possible causes, but if you are using Access 2003 SP1, and
the subreport uses a form as the source object, see:
http://support.microsoft.com/?id=889186

Article includes:
When you use a form as a subreport in an Access 2003 report,
all pages of the subreport after page 1 are blank. This problem
occurs after you install Microsoft Office 2003 Service Pack 1 (SP1).
 
I guess I should have been a little more informative. I am using Access 2000
and the subreport is based on a query. The first record in the rescordset
has detail that fits on one page and the subreport prints correctly. The
next record detail carries over to a second page and the subreport does not
print. As i move through the recordset there are other records that fit on
one page but their subreport does not print.

This has been confusing to me but now that I think about it, I believe this
is the first time if have created a report/subreport that the detail of a
record could be more than one page.

Appreciate your assistance.

Fred Alyea
(e-mail address removed)
 
Other possible issues include:
1. Code in the events of the report that messes with the runtime properties
such as MoveLayout, PrintSection, or the Visible property of the section or
subreport.

2. Corruption of the database due to Name AutoCorrect. Uncheck the boxes
under:
Tools | Options | General | Name AutoCorrect
and then compact the database.

3. Faulty printer driver. If this is the case, the report will work
correctly if assigned to a different printer.

4. Faulty linking of master and sub. This can happen if the data types of
the fields named in the LinkMasterFields and LinkChildFields properties are
different (e.g. one text field, and one number), or if either of them is
based on a calculated query field or an expression. The workaround is to
typecast the query field and set the Format property of the text box. More
info:
http://allenbrowne.com/ser-45.html

5. Inadequate service packs. If you don't have SP3 for Access 2000, you can
get it from:
http://support.microsoft.com/gp/sp

If you have any conditional formatting in the main or subreport, you could
try turning that off until you get it working also.
 
Allen...

None of your suggestion were the issue, it was a great deal simpler and a
bit stupid on my part. The two queries that supported the recordsets used
for this report used criteria supplied by a combo box on the a form. In my
zeal to clean thing up when the control "Okay" was clicked it opened the
report and then just before the exit sub I cleared the combo box with
Me!Combo1="". So the first page had subreport data but any additional pages
didn't as the criteria for the query was now missing.

To clean up the form, I will use the report OnClose. Thank you for you
assistance as you did bring to my attention possible areas where I could have
made a mistake and I now have the URL for you website.

Fred Alyea
(e-mail address removed)
 
Back
Top