Microsoft KB Archive/155077

= ACC: Subreport with Snaking Columns Prints Blank Pages =

Article ID: 155077

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q155077



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



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



Creating the Subreport
 Open the sample database Northwind.mdb. Start the Report Wizard to create a new report based on the Products table. In the "Which fields do you want on your report" box, select ProductName, and then click Finish. Open the report in Design view.</li> 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).</li> Repeat step 5 to remove the Report Header/Footer sections.</li> On the View menu, click Properties.</li> Set the Width property of the report to 3".</li> On the File menu, click Page Setup.</li> Set all margins to 0". They will automatically resize themselves to the minimum margins your printer will allow.</li> Follow these steps for your version of Microsoft Access

In Microsoft Access 97:

<ol style="list-style-type: lower-alpha;"> Click the Columns tab.</li> Under Grid Settings, type 2 in the Number Of Columns box.</li> Under Column Layout, click Down, Then Across. Click OK.</li></ol>

In Microsoft Access 7.0: <ol style="list-style-type: lower-alpha;"> Click the Layout tab.</li> Under Grid Settings, set Items Across to 2.</li> Under Layout Items, click Down, Then Across. Click OK.</li></ol> </li> Save the report as ColumnReport and close it.</li></ol>

Creating the Main Report
<ol> Use the AutoReport: Tabular Wizard to create a new report based on the Categories table.</li> <li>Save the report as MainReport, and then open it in Design view.</li> <li>Remove the following five controls from the report: <ul> <li>The picture label control in the Page Header section</li> <li>The line control in the Page Header section</li> <li>The bound object frame control (picture) in the Detail section</li> <li>The line control in the Page Footer section</li> <li>The "Page of Pages" text box control in the Page Footer section</li></ul> </li> <li>On the View menu, click Properties.</li> <li>Set the report's Width property to 5.5".</li> <li>Set the Top property to 2" for each of these controls in the Detail section of the report: <ul> <li>CategoryID</li> <li>CategoryName</li> <li>Description</li></ul> </li> <li> Add a subreport control to the Detail section of the report and set the following properties: <pre class="fixed_text">     Subreport --     Name: ColumnReport Source Object: ColumnReport Link Child Fields: CategoryID Link Master Fields: CategoryID Left: 0"     Top: 2.5" Width: 5"     Height: .3                    </li> <li>Set the Height property of the Detail section to 2.8", and then save the report.</li> <li>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).</li></ol>

Additional query words: snaking columns multiple

Keywords: kbbug KB155077

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.