Reports with Subreports


Just as with forms, you can place reports on other reports as subreports. However, this isn’t necessary nearly as often for reports as for forms because there is no problem with using nonupdatable queries as report record sources. This means that instead of placing a linked subreport on a main report, it’s often easier to just add the linked table to the report’s record source, and place data from the linked table in the appropriate section of a grouped report.

However, there are some circumstances in which a subreport may be useful. If you need to display the same linked information on numerous reports, you can create a subreport, format it as needed, and place the same subreport on all the reports that need it, which saves time. You can also use subreports to display unlinked data on reports, such as a PivotTable or PivotChart showing company-wide sales. Figure 6.24 shows a variant of the Orders grouped report, with a PivotTable showing toy sales by shipper in the report header, in the form of an embedded PivotTable subform.

click to expand
Figure 6.24

You can embed a form on a report, but not a report on a form.

For an example of a linked subreport, see the Single Order report in the next section, which uses a sub-report linked on ShipAddressID and CustomerID to display the shipping address for an order.




Expert One-on-One(c) Microsoft Access Application Development
Expert One-on-One Microsoft Access Application Development
ISBN: 0764559044
EAN: 2147483647
Year: 2006
Pages: 124
Authors: Helen Feddema

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net