Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

8.02 Referencing Reports Fields

Referencing Report Fields

Writing formulas requires referencing all types of data from your report and the databases that the report uses. The types of data that can be referenced consist of running total fields, the results of other formulas, and table fields. The syntax for referencing fields in a formula is to surround the field name with curly brackets. The syntax for referencing the field name is dependent upon the type of field it is.

Formulas are referenced by putting @ in front of the name.

{@Formula}

Parameters are referenced with a ? in front of the name.

{?Parameter}

Running total fields are referenced by putting # in front of the name.

{#RunningTotal}

Table fields are referenced by separating the table name and the field name with a period between the two. Spaces are allowed.

{Customer.First Name}

Group fields use the field name with the GroupName() formula.

GroupName({Table.GroupField})

Summary fields pass the field name and the group field to the summary function.

Sum({Table.FieldName}, {Table.GroupName})