User`s guide
Pulling out a portion, or portions, of a text string
To extract the first letter of the customer name:
Crystal syntax example:
{Customer.Customer Name} [1]
Basic syntax example:
formula = {Customer.Customer Name} (1)
Extracting parts of a date
To determine what month an order was placed:
Crystal syntax example:
Month ({Orders.Order Date})
Basic syntax example:
formula = Month ({Orders.Order Date})
Using a custom function
To convert $500 from U.S. currency to Canadian:
Crystal syntax example:
cdConvertUSToCanadian (500)
Basic syntax example:
formula = cdConvertUSToCanadian (500)
20.2 Formula components and syntax
Formulas contain two critical parts: the components and the syntax. The components are the pieces
that you add to create a formula while the syntax is the rules that you follow to organize the components.
20.2.1 Formula components
Creating a formula in Crystal Reports is like creating one in any spreadsheet application. You can use
any of the following components in your formula:
Fields
Example: {customer.CUSTOMER LAST NAME}, {customer.LAST YEAR'S SALES}
2012-03-14416
Using Formulas