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.
- Save the report as SubReport, and then close the report.
- Create a new report that is not based on any table or query in Design view.
- Drag the SubReport report from the Database window to the detail section of this new report.
- 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.
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.