Math Functions

book list add book to my bookshelf create a bookmark purchase this book online

mastering crystal reports 9
Appendix E - Crystal Reports Built-in Functions
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

The built-in math functions for Basic Syntax and Crystal Syntax allow some fairly sophisticated mathematic calculations. Use these functions in formula fields, conditional statements, and in other functions.

Abs(x) Returns a positive value for x.

Atn (number) Returns the angle whose tangent is the argument to the function.

Cos (number) Returns the cosine of an angle that was specified in radians.

Exp (number) Returns e (approximately 2.718282) raised to a power.

Fix (number), Fix (number, #places) Returns a truncated value.

Log (number) Returns a natural logarithm.

Pi Returns 3.14159265…

Remainder (number1, number2) Returns an integer that is left over after number1 is divided by number2. The following Basic Syntax function can be used to control formatting in the Details section and set each even record number background to green and each odd number background to white:

If Remainder( recordNumber, 2) = 0 Then   crGreen Else   crWhite End If

Rnd, Rnd (seed) Returns a random number optionally based on a starting seed value.

Round (x), Round (x, #places) Returns a number rounded down to the nearest integer.

Sin (number) Returns the sine of an angle that was specified in radians.

Sqr (number) Returns the square root of a number.

Tan (number) Returns the tangent of an angle that was specified in radians.

Truncate (x), Truncate (x, #places) Returns a truncated value.

Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement
 
Conello © 2000-2003     Feedback


Mastering Crystal Reports 9
Mastering Crystal Reports 9
ISBN: 0782141730
EAN: 2147483647
Year: 2005
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net