ACC: Subreport with Snaking Columns Prints Blank Pages
ID: Q155077
|
The information in this article applies to:
-
Microsoft Access versions 7.0, 97
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:
- Open the subreport in Design View.
- On the File menu, click Page Setup.
- Click the Columns tab (or the Layout tab in Microsoft Access 7.0).
- 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
- 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.
- 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).
- 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 will automatically resize themselves to
the minimum margins your printer will allow.
- Follow these steps for your version of Microsoft Access
In Microsoft Access 97:
- Click the Columns tab.
- Under Grid Settings, type 2 in the Number Of Columns box.
- Under Column Layout, click Down, Then Across. Click OK.
In Microsoft Access 7.0:
- Click the Layout tab.
- Under Grid Settings, set Items Across to 2.
- Under Layout Items, click Down, Then Across. Click OK
- Save the report as ColumnReport and 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 2" 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 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
- Set the Height property of the Detail section to 2.8", and then save
the report.
- 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