To Create Formulas Fields in crystal report follow bellow steps:
=> Fisrt Goto
'Fields Explorer'.
=> Select
'Formula Fields'.
=> Right Click on it & select
'New'.
=> Now
'Formula Name' popup is open. Enter appropriate Formula
Name and Click on
'OK' Button.
=> Now
'Formula Workshop - Formula Editor' Screen will be open.
=> And After writing formula in Formula Editor then
'Save' it.
Below listed the various elements are combined together using the rules of
expression that govern our selected syntax (Crystal or Basic) to create the formulas
used in our reports.
Sr.No
|
Element
|
Purpose
|
1)
|
Fields
|
We will frequently make references to field values that are contained in the underlying
tables of our report. These will always be in the format of "tablename.fieldname",
enclosed in braces { }. Example: {dtemp.EmpID}.
|
2)
|
Functions
|
There are various type of function available in crystal report that can used to
perform operations on different types of numeric, date/time and string(txt) on many
more.Example: AVERAGE({orders.Order Amount}).
|
3)
|
Operators
|
Crystal Reports allows for the use of several standard mathematical and comparison
operators in report formulas. For example, the + sign can be used for addition,
the > symbol means "greater than", and so on and so forth.
|
4)
|
Other Formulas
|
We can used the Other formulas which we have created eailer in crystal report. This
formulas can be used by preceding them with the @ symbol, followed by the formula
name, all surrounded by braces. Example: {@FormulaName}.
|
After creating formula field we can use this on crystal Report.Formulas are
not case-sensitive. They are also not sensitive to carriage returns or spaces.
No comments:
Post a Comment
Please do not enter any spam link in the comment box.