Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 208364 - Last Review: June 30, 2004 - Revision: 2.0
ACC2000: Only a Single Column Is Printed in a Subreport with Multiple Columns
This article was previously published under Q208364
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
When you create a main report that has a subreport with snaking (multiple)
columns, the report is printed with only one column of data for the subreport. This behavior occurs when items on the subreport extend to two columns.
You are attempting to use a multi-column subreport in which the
Layout
Items property has been set to
Down, then Across. Because subreports are designed to stretch vertically to accommodate the necessary number of records, but the columns in the subreport fill down and then wrap to the top of the next column, the report stretches downward. Therefore, only one column is printed.
To work around this behavior, follow these steps:
- Open the subreport in Design view.
- On the File menu, click Page Setup.
- Click the Columns tab.
- Under Column Layout, click
Across, then Down.
Microsoft has confirmed that this is a problem in Microsoft Access 2000.
Steps to Reproduce the Problem
Creating the Subreport
- Start Microsoft Access, and then open the sample database Northwind.mdb or the sample project NorthwindCS.adp.
- In the Database window, click Reports under Objects, and then click New. Create a new report based on the Products
table using the Report Wizard. Click OK.
- In the "Which fields do you want on your report" box, select ProductName, and then click Finish.
- Open the report in Design view.
- On the View menu, click Page Header/Footer to remove those sections from the report. Click Yes at the prompt "Do you want to delete these sections anyway?"
- Repeat step 5 to remove the Report Header/Footer sections.
- On the View menu, click Properties.
- Set the Width property of the report to 3".
- On the File menu, click Page Setup.
- Set all margins to 0". They automatically resize themselves to the minimum margins that your printer allows.
- Click the Columns tab, and then under Grid Settings, type 2 in the Number of Columns box.
- Under Column Layout, click Down, then Across, and then click OK.
- Save the report as ColumnReport, and then close it.
Creating the Main Report
- Use the AutoReport: Tabular Wizard to create a new report based on the Categories table.
- Save the report as MainReport, and then open it in Design view.
- Remove the following five controls from the report:
- The picture label control in the Page Header section.
- The line control in the Page Header section.
- The bound object frame control (picture) in the Detail section.
- The line control in the Page Footer section.
- The "Page of Pages" text box control in the Page Footer section.
- On the View menu, click Properties.
- Set the report's Width property to 5.5".
- Set the Top property to 0" for each of these controls in the Detail section of the report:
- CategoryID
- CategoryName
- Description
- Add a subreport control to the Detail section of the report, and then set the following properties:
Name: ColumnReport
Source Object: ColumnReport
Link Child Fields: CategoryID
Link Master Fields: CategoryID
Left: 0"
Top: .3"
Width: 5"
Height: .3
- Set the Height property of the Detail section to 1", and then save the report.
- On the File menu, click Print Preview. Note the single column of data in the subreport.
For more information about creating a subreport, click
Microsoft Access Help on the
Help menu, type
create a subreport in the Office Assistant or
the Answer Wizard, and then click
Search to view the topics
returned.
APPLIES TO
- Microsoft Access 2000 Standard Edition
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate