Kbase P105541: How to create a formula field on Crystal Reports?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
How to create a formula field on Crystal Reports?
GOAL:
Is there a calculated field capability in Crystal Reports?
GOAL:
What is a Crystal Reports function field?
FIX:
The formula field is used to manipulate data in the report. Fro example, it can perform calculation or change the way a field looks. Formulas are like a small piece of computer programming code that processes and prints its results into the report, just like the database field.
Typical uses for formula include:
Calculating a percentage of a number
Extracting a single character from a string field
Combining a text string with a number or date field
Finding the difference between two date fields
Performing conditional logic
To create a formula field do the following:
If you do not have the field explorer opened, choose view on the menu and "Field Explorer"
On the Field Explorer, highlight the formula field
Right click and choose New
The formula workshop window will open
Choose the New function icon on the top menu
Name your formula field
Create your function ( for more information on function syntax look into the Crystal Reports help)
The new function field will appears under the function fields group
To use it, just drag to the report area