Subreports can be saved to a separate, independent report file and can also be reimported when the main report is opened. Saving subreports to an external file allows you to break up main reports and subreports so users can print the subreport independently or use it in other reports. To save a subreport, right-click directly on top of the subreport object in your main report and select Save Subreport As. Specify a file name and click OK, and your subreport will be saved to a separate file.
Reimporting subreports provides a creative way of using them. Using this facility, you can create a number of reports that can serve both as subreports and as reports in their own right. This setting is available for linked or unlinked subreports that have been inserted from an existing report file. To enable this setting, locate a subreport that has been inserted from an existing file, right-click directly on top of the subreport object, and select Format from the right-click menu.
The Subreport property page contains a Re-import When Opening check box. Enable this option, as shown in Figure 3-44, and Crystal Reports will look in the last file location and attempt to reimport the report file you originally used.
If the report file name or location has changed, Crystal Reports will display the error message and allow you to select the correct file name or location for the subreport you want to import.
You can also force reimport at any time by right-clicking the subreport object and selecting Re-import Subreport from the right-click menu.
Was this article helpful?