Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Only a Single Column Is Printed in a Subreport with Multiple Columns


View products that this article applies to.

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).

↑ Back to the top


Symptoms

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.

↑ Back to the top


Cause

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.

↑ Back to the top


Resolution

To work around this behavior, follow these steps:
  1. Open the subreport in Design view.
  2. On the File menu, click Page Setup.
  3. Click the Columns tab.
  4. Under Column Layout, click Across, then Down.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in Microsoft Access 2000.

↑ Back to the top


More information

Steps to Reproduce the Problem

Creating the Subreport

  1. Start Microsoft Access, and then open the sample database Northwind.mdb or the sample project NorthwindCS.adp.
  2. 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.
  3. In the "Which fields do you want on your report" box, select ProductName, and then click Finish.
  4. Open the report in Design view.
  5. 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?"
  6. Repeat step 5 to remove the Report Header/Footer sections.
  7. On the View menu, click Properties.
  8. Set the Width property of the report to 3".
  9. On the File menu, click Page Setup.
  10. Set all margins to 0". They automatically resize themselves to the minimum margins that your printer allows.
  11. Click the Columns tab, and then under Grid Settings, type 2 in the Number of Columns box.
  12. Under Column Layout, click Down, then Across, and then click OK.
  13. Save the report as ColumnReport, and then close it.

Creating the Main Report

  1. Use the AutoReport: Tabular Wizard to create a new report based on the Categories table.
  2. Save the report as MainReport, and then open it in Design view.
  3. 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.
  4. On the View menu, click Properties.
  5. Set the report's Width property to 5.5".
  6. Set the Top property to 0" for each of these controls in the Detail section of the report:
    • CategoryID
    • CategoryName
    • Description
  7. 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
  8. Set the Height property of the Detail section to 1", and then save the report.
  9. On the File menu, click Print Preview. Note the single column of data in the subreport.

↑ Back to the top


References

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.

↑ Back to the top


Keywords: KB208364, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 208364
Revision : 2
Created on : 6/30/2004
Published on : 6/30/2004
Exists online : False
Views : 253