Operation Manual

Subreports
Linking a subreport to the data in the primary report
24
Crystal Reports User’s Guide 475
Updating subreports
In order to maintain the most up-to-date subreports, you may want to re-
import a subreport automatically when opening the main report.
Note: Re-importing is available only for subreports that were created from a
report file.
Re-importing not only updates the data, but updates the formatting, grouping,
and structure of the subreport if any changes have been made. If you change
the report the subreport was originally based on, you can have these changes
reflected in the report containing the subreport.
You can either globally specify that all subreports should be re-imported, or
set the automatic re-import for an individual subreport.
u
To globally update subreports when opening a main report
1. On the File menu, click Options.
2. In the Options dialog box, click the Reporting tab.
3. Click Re-import Subreport on Open.
4. Click OK.
Any subreport will be updated when its main report is opened and
refreshed.
u
To update a specific subreport when opening a main report
1. From the Format menu, click Format Subreport.
2. In the Format Editor dialog box, click the Subreport tab.
3. Click Re-import When Opening.
The current subreport will be updated when the main report is opened
and refreshed.
Linking a subreport to the data
in the primary report
Frequently, the data in a subreport supplements the data in the primary
report. You might, for example, have customer data in a primary report and
then use subreports to show the orders for each customer.
In such cases, you will need to coordinate the data in the primary report with
the data in the subreport so that the orders in each subreport match up with
the correct customer.