beautypg.com

Formula components – HP Intelligent Management Center Standard Software Platform User Manual

Page 556

background image

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}

Numbers

Example: 1, 2, 3.1416

Text

Example: "Quantity", ":", "your text"

Operators

Example: + (add), / (divide), -x (negate)

Operators are actions you can use in your formulas.

Functions

Example: Round (x), Trim (x)

Functions perform calculations such as average, sum, and count. All functions
available are listed with their arguments and are arranged by their use.

Custom functions

Example: cdFirstDayofMonth, cdStatutoryHolidays

Custom functions provide a way to share and reuse formula logic. They can
be stored in the BusinessObjects Enterprise Repository and then added to
a report. Once in the report, custom functions can be used in the Formula
Expert when creating formulas.

556

Crystal Reports 2008 SP3 User's Guide

Using Formulas

22

Formula components and syntax