Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

12.09 Unlinked Subreports with a Formula

Unlinked Subreports

An unlinked subreport doesn’t have a connection to the main report. It is totally independent. To create an unlinked subreport, do not set any properties on this dialog box. If you had already added fields to the listbox on the right, then remove them and this will remove any links between the main report and this subreport.

Unlinked with a Formula

Formulas are used with unlinked subreports so that information can be passed to the subreport without filtering any data. This is similar to the unlinked subreport because both subreports are independent of the main report. The benefit with using a formula is that although the subreport isn’t linked, you can still pass information from the main report to the subreport. This information can be displayed on the report or used in the subreport’s formulas.

To create an unlinked formula field, select the formula from the main report’s list of available report fields. Once the formula has been selected, the frame at the bottom of the dialog box appears and the parameter name is already filled in. Since this is an unlinked report, uncheck the checkbox that is to the right of the parameter name. This causes the linking field dropdown box to become disabled and no linking field will be specified.

When the subreport runs, it can reference the parameter that is created by this dialog box to get the formula’s value from the main report.