beautypg.com

HP Intelligent Management Center Standard Software Platform User Manual

Page 649

background image

dates, or date/time fields, you must make sure your subreport parameter
field type matches the field type set up in Report Options in the main report
for the field you want linked.

Linking a subreport to the main report without
modifying the selection formula

Crystal Reports uses a parameter field mechanism for linking subreports to
main reports.

When linking a main report field that is not a parameter field to a subreport
field, the program:

Automatically creates a parameter field to complete the link.

Modifies the subreport record selection formula to select those records
in which the subreport field is equal to the parameter field value.

The need for a parameter field is implied; it is called an "Implicit Link" situation.

At times, you may wish to use a linked parameter field in a subreport without
using it as part of the selection formula for the subreport. For instance, you
may want the main report to pass in a summary value that can be used in
calculations by the subreport, or you may want the main report to pass in
the title of the subreport.

When you link a field in the main report to a parameter field that you have
created in the subreport, the program:

Checks the link you have specified.

Does not create any additional parameter fields.

Does not modify the subreport record selection formula.

Specifying a link is called an "Explicit Link" situation.

To link a subreport to a main report without modifying the
selection formula

1.

Create a parameter field in the subreport.

2.

Link a field in the main report to that parameter field.

Crystal Reports 2008 SP3 User's Guide

649

24

Subreports

Linking a subreport to the data in the primary report