ACC: Subreport with Snaking Columns Prints Blank Pages

ID: Q155077


The information in this article applies to:


SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you create a main report that has a subreport with snaking (multiple) columns, you will see the following behavior when you print or preview the report:

In Microsoft Access 97



   The report will only print one column of data for the subreport. 

In Microsoft Access 7.0



   You receive infinite blank pages on the report. 

This behavior occurs when items on the subreport extend to 2 columns.


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. For this reason, you received blank pages (Microsoft Access 7.0) or only one column prints (Microsoft Access 97).


RESOLUTION

Use the following steps to work around this behavior:

  1. Open the subreport in Design View.


  2. On the File menu, click Page Setup.


  3. Click the Columns tab (or the Layout tab in Microsoft Access 7.0).


  4. Under Column Layout (or Layout Items in Microsoft Access 7.0), click Across, Then Down.



STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and 97.


MORE INFORMATION

Steps to Reproduce Problem

Creating the Subreport


  1. Open the sample database Northwind.mdb.


  2. Start the Report Wizard to create a new report based on the Products table.


  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?" (or "Do you want to continue anyway?" in Microsoft Access 7.0).


  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 will automatically resize themselves to the minimum margins your printer will allow.


  11. Follow these steps for your version of Microsoft Access

    In Microsoft Access 97:

    1. Click the Columns tab.


    2. Under Grid Settings, type 2 in the Number Of Columns box.


    3. Under Column Layout, click Down, Then Across. Click OK.


    In Microsoft Access 7.0:

    1. Click the Layout tab.


    2. Under Grid Settings, set Items Across to 2.


    3. Under Layout Items, click Down, Then Across. Click OK




  12. Save the report as ColumnReport and 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:



  4. On the View menu, click Properties.


  5. Set the report's Width property to 5.5".


  6. Set the Top property to 2" for each of these controls in the Detail section of the report:



  7. Add a subreport control to the Detail section of the report and set the following properties:
    
          Subreport
          ------------------------------
          Name: ColumnReport
          Source Object: ColumnReport
          Link Child Fields: CategoryID
          Link Master Fields: CategoryID
          Left: 0"
          Top: 2.5"
          Width: 5"
          Height: .3 


  8. Set the Height property of the Detail section to 2.8", and then save the report.


  9. On the File menu, click Print Preview. Note the single column of data in the subreport. (In Microsoft Access 7.0 note the blank pages as you page through the report).


Additional query words: snaking columns multiple


Keywords          : RptWizsn 
Version           : 7.0 97
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 23, 1999