Subreports

Previous Topic: Stored Procedures

A Crystal Reports subreport is a report within a report. It has all of the characteristics of a regular report, but cannot include other subreports within itself. Subreports can be free-standing or they can be linked to the data in the primary report. You to insert as many subreports as you want into a regular report.

There are four instances in which a subreport would typically be used:

For example, the picture below shows a report that contains the “RSEmployees” subreport, designed to display the employees for each job type. If no team is assigned to the job, it will be displayed as “unassigned” (Team Name).

To add a subreport to a Crystal Report:

  1. In the Customize view, right-click on any empty space in the report and select Insert > Subreport from the pop-up menu. A frame box appears.

  2. Mouse to where you would like the subreport to appear and click the mouse to place it on the report. The Insert subreport dialog box appears.

  3. If you want to use an existing subreport:

    1. Select the Choose a report option button.

    2. Click Browse. An Open dialog box appears.

    3. Browse to and select the subreport you want to use and click OK.

  4. If you want to create a new subreport:

    1. Select the Create a subreport option button.

    2. Type a name for the subreport in the Report Name field.

    3. Click Report Wizard and follow the steps to create the subreport.

  5. If you would like the subreport to only be run when asked for, select the On-demand Subreport check box.

  6. Click OK.

Next Topic: Parameter Fields

Back to Reports Table of Contents

Did you find this topic useful? Yes
No
I don't know
Why?