Microsoft KB Archive/212748

= ACC2000: Columns in a Subreport Do Not Snake =

Article ID: 212748

Article Last Modified on 7/14/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q212748



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
A subreport that contains snaking columns does not snake to multiple columns when you preview the main report. The subreport does snake, however, if you preview the subreport as a stand-alone report (instead of within the main report).



CAUSE
This behavior is by design. When you drop one report onto another report, Access creates a subreport control and sets the CanGrow property of the subreport control to Yes (the default for subreport controls).



RESOLUTION
Set the CanGrow property of the subreport control to No and, if necessary, increase the Width property of the main report and the Width property of the subreport control in order to view the snaking columns. For an example of how to do this, follow these steps:  Open the sample database Northwind.mdb. Create a new report that is based on the Suppliers table in Design view. View the property sheet for the report, and set the Width property to 3" and the Height property of the detail section to 1". Drag the SupplierID, CompanyName, and ContactName fields from the field list to the detail section of the report. On the File menu, click Page Setup. Click the Columns tab, and then set the Number of Columns box to 2. Under Column Layout, click Down, then Across, and then click OK.</li> Save the report as SubReport, and then close the report.</li> Create a new report that is not based on any table or query in Design view.</li> Drag the SubReport report from the Database window to the detail section of this new report.</li> Set the following properties of the subreport control:

CanGrow: No

Left: 0"

Top: 0"

Width: 6"

Height: 5"

Save the new report as MainReport, and then preview the report. Note that the subreport displays its data in two columns.</li></ol>

NOTE: By design, once the CanGrow property is set to No, in order for the subreport to display all records, the main report must be bound, and the LinkChild and LinkMaster properties must be set appropriately.

<div class="moreinformation_section">

MORE INFORMATION
Columns in a subreport do not snake when both of the following conditions are true:
 * The Column Layout option is set to Down, Then Across in the Page Setup dialog box.
 * The CanGrow subreport control property is set to Yes.

Steps to Reproduce the Behavior
<ol> Open the sample database Northwind.mdb.</li> Create a new report that is based on the Suppliers table in Design view.</li> Set the Width property of the report to 3", and set the Height property of the detail section to 1".</li> Drag the SupplierID, CompanyName, and ContactName fields from the field list to the detail section of the report.</li> On the File menu, click Page Setup.</li> Click the Columns tab, and then set the Number of Columns box to 2.</li> Under Column Layout, click Down, then Across, and then click OK.</li> Save the report as SubReport, and then preview the report. Note that the report is displayed in two columns.</li> Close the SubReport report, and then create a new report that is not based on any table or query in Design view.</li> Drag the SubReport report from the Database window to the detail section of the new report.</li> Set the following properties for the subreport control:

Left: 0"

Top: 0"

Width: 6"

Height: 5"

</li> <li>Save the new report as MainReport, and then preview the report.</li></ol>

Note that the subreport is displayed as one column in the main report instead of two, and that you must move to other pages to view the remaining records.

Additional query words: prb

Keywords: kbprb KB212748

-

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

© Microsoft Corporation. All rights reserved.