Formula syntax, Crystal and basic syntax – HP Intelligent Management Center Standard Software Platform User Manual
Page 557
Control Structures
Example: "If" and "Select", "For" loops
Group field values
Example: Average (fld, condFld), Sum (fld, condFld, "condition")
Group field values summarize a group. For example, you could use group
field values to find the percentage of the grand total contributed by each
group.
Other formulas
Example: {@GrossProfit}, {@QUOTA}
Formula syntax
Syntax rules are used to create correct formula. Some basic rules are:
•
Enclose text strings in quotation marks.
•
Enclose arguments in parentheses (where applicable).
•
Referenced formulas are identified with a leading @ sign.
Crystal and Basic syntax
When creating formulas, you have the option of using either Crystal or Basic
syntax. Almost any formula written with one syntax can be written with the
other. Reports can contain formulas that use Basic syntax as well as formulas
that use Crystal syntax.
Crystal syntax is the formula language included in all versions of Crystal
Reports.
If you are familiar with Microsoft Visual Basic or other versions of Basic, then
Basic syntax may be more familiar to you. In general, Basic syntax is modeled
on Visual Basic except that it has specific extensions to handle reporting.
Crystal Reports 2008 SP3 User's Guide
557
22
Using Formulas
Formula components and syntax