User`s guide
For example, when designing a report that shows each employee's quarterly sales for each product
and each product type, you might also want to track each employee's progress by including weekly
sales information. This additional data, however, may not be of interest to many users viewing the
report. In such a case, extract the weekly sales portion of the report and attach it as an on-demand
subreport. Detailed information about weekly sales is retrieved from the database only when a user
drills down on the on-demand subreport.
Many report objects—such as large cross-tabs, OLAP grids, advanced charts, and maps—are ideal
candidates to include in on-demand subreports, so that the object is not processed until you drill down.
To insert an on-demand subreport, see Inserting subreports and Creating an on-demand subreport.
Tip:
You could also place such report objects in a hidden Details section of a report that uses the Perform
Grouping On Server option. When you do this, the database server performs the majority of the
processing, and only a subset of the records is transferred from the server to the local machine (other
records are retrieved when you drill down to a hidden section).
6.3.4.2 Using linked subreports
When a subreport is linked, Crystal Reports coordinates the data in the subreport with the matching
records in the primary report. If you need to use regular linked subreports—that is, linked subreports
that are not on-demand subreports—you should consider these guidelines:
• If the additional data provided by a regular linked subreport is useful to relatively few users, create
a linked on-demand subreport instead. Users who need to see the extra data click a hyperlink to
view the subreport; users who don't need to see the extra data won't have to download it from the
database server.
• In some cases, placing regular linked subreports in the Details section of a main report may hinder
performance—especially when your main report contains many records. (This is because you're
creating a separate subreport for each record, and a separate query must be run for each database
record in the main report.) As an alternative, consider using linked on-demand subreports in the
Details section of your main report.
6.3.4.3 Linking tables instead of linking subreports
Whenever possible, coordinate your report data by linking database tables on the Links tab of the
Database Expert, rather than by linking regular subreports—that is, subreports that aren't on-demand
subreports—to the main report. Since each subreport is run as a separate report, linked tables often
have a performance advantage.
2012-03-14114
Designing Optimized Web Reports